3

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?

1 Answer 1

5

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...

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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