[OSGeo Africa] django, google maps api V3 and open layers

Diego Madanga diegomadanga at gmail.com
Tue Nov 26 23:41:46 PST 2013


Iam working on a django admin interface.

i have my* google.js* that extends the *open layers.js*

#* google.js*

*{% extends "gis/admin/openlayers.js" %}*
*{% block base_layer %}new OpenLayers.Layer.Google("Google Hybrid", {type:
google.maps.MapTypeId.HYBRID});{% endblock %}*


how do i add the following layers to my *google.js* and have an alternative
to load which ever layer i want as a base layer:

*new OpenLayers.Layer.Google("Google Satellite", {type:
google.maps.MapTypeId.SATELLITE});*
*new OpenLayers.Layer.Google("Google Hybrid", {type:
google.maps.MapTypeId.HYBRID});*
*new OpenLayers.Layer.Google("Google Streets", {type:
google.maps.MapTypeId.STREETS});*


my *google.html* looks like this:

#* google.html *

*{% extends "gis/admin/openlayers.html" %}*
*{% block extrastyle %}{{ block.super }}*
*<style type="text/css">v\:* {behavior:url(#default#VML);}</style>*
*{% endblock %}*
*{% block openlayers %}{% include "admin/google.js" %}{% endblock %}*


Any python django (geodjango) devs please help !!

Regards,

*Diego Madanga*
GIS Developer/Technologist
 BSc (Hons) Surveying and Geomatics
Lidwala Consulting Engineers
P.O. Box 2930
Nelspruit, 1200

Tel: 0861 LIDWALA / 0861 543 9252
Fax: 086 585 1536
Cell: 0715 933 760
email: dmadanga at lidwala.com
Web: www.lidwala.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20131127/84cf1022/attachment.html>


More information about the Africa mailing list