Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The standard GeoDjango admin has a basic VMAP0 background. OsmGeoAdmin adds an OSM background.

How do I replace the background map with another WMS?

In the source code of the admin OpenLayers template there are {{ wms_url }} and {{ wms_name }} variables but I cannot find where these can be specified to customize it.

Or should I just completely override the default admin template?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

try to read Improving the Admin from http://blog.adamfast.com/

{% extends "gis/admin/openlayers.js" %}

{% block extra_layers %}
    topo_layer = new OpenLayers.Layer.WMS( "USA Topo", "http://terraservice.net/ogcmap.ashx", {layers: 'DRG'} );
    {{ module }}.map.addLayer(topo_layer);
    nexrad_layer = new OpenLayers.Layer.WMS( "NEXRAD", "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?", {layers:"nexrad-n0r",transparent:"true",format:'image/png'} );
    {{ module }}.map.addLayer(nexrad_layer);
{% endblock extra_layers %}

i hope it helps you...

share|improve this answer
    
A very detailed guide indeed. Thank you. –  steko Dec 18 '12 at 16:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.