Ticket #11634: openlayers.diff
File openlayers.diff, 1.4 KB (added by , 15 years ago) |
---|
-
django/contrib/gis/templates/gis/admin/openlayers.js
66 66 {{ module }}.clearFeatures = function (){ 67 67 {{ module }}.deleteFeatures(); 68 68 document.getElementById('{{ id }}').value = ''; 69 {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }}); 69 {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}){% if display_srid 70 +%}.transform({{ module }}.map.displayProjection, {{ module }}.map.getProjectionObject()){% endif %}, {{ default_zoom }}); 70 71 } 71 72 // Add Select control 72 73 {{ module }}.addSelectControl = function(){ … … 131 132 {{ module }}.map.zoomTo({{ point_zoom }}); 132 133 } 133 134 } else { 134 {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }}); 135 {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}){% if display_srid 136 %}.transform({{ module }}.map.displayProjection, {{ module }}.map.getProjectionObject()){% endif %}, {{ default_zoom }}); 135 137 } 136 138 // This allows editing of the geographic fields -- the modified WKT is 137 139 // written back to the content field (as EWKT, so that the ORM will know