Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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