From 7c93f2c7ded24b920f643cfbdd2ff1a889782276 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 29 Aug 2011 06:32:15 +0530 Subject: [PATCH] projection --- gazetteer/places/models.py | 2 +- gazetteer/static/js/gazetteer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 4daf8c1..7b99a7e 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -58,7 +58,7 @@ class Feature(models.Model): feature_type_name.short_description = "Feature Type" def get_geojson(self): - geom = json.loads(self.geometry.geojson) + geom = json.loads(self.geometry.transform(3785, True).geojson) properties = { 'id': self.id, 'preferred_name': self.preferred_name diff --git a/gazetteer/static/js/gazetteer.js b/gazetteer/static/js/gazetteer.js index 1271f29..b1e2c63 100644 --- a/gazetteer/static/js/gazetteer.js +++ b/gazetteer/static/js/gazetteer.js @@ -1,6 +1,6 @@ $(function() { map = new OpenLayers.Map('map', {}); - var baseLayer = new OpenLayers.Layer.OSM( "Openstreetmap Base Layer"); + var baseLayer = new OpenLayers.Layer.OSM( "Openstreetmap Base Layer", {isBaseLayer: true}); // map.addLayer(baseLayer); var geojson_format = new OpenLayers.Format.GeoJSON(); var jsonLayer = new OpenLayers.Layer.Vector();