geosav
unread,Dec 28, 2011, 5:59:30 PM12/28/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to geodjango
I'm trying to add a geojson vector layer on top of the osm baselayer
while editing in admin.
I was given the following stub to use with this block statement within
the template openlayers.js( line 114)
{% block extra_layers %}{% endblock %}
{% extends "gis/admin/osm.js" %}
{% block extra_layers %}
// add layer info here
{% endblock %}
I created this file, myextra.js which is in the same folder as the
default geodjango templates.
needless to say, it does nothing. I'm obviously new to django and I
was hoping for a little direction
{% extends "gis/admin/osm.js" %}
{% block extra_layers %}
var brewster_boundary = new OpenLayers.Layer.Vector("Brewster Town
Lines", {
projection: new OpenLayers.Projection("EPSG:4326"),
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "/home/michael/PycharmProjects/bct/main/data/
zoning.geojson",
format: new OpenLayers.Format.GeoJSON({})
})
});
{% endblock %}
thanks in advance,
Michael