flip every y,x to x,y
This commit is contained in:
parent
cce476c37a
commit
a3be7b2842
7 changed files with 19 additions and 17 deletions
|
@ -63,7 +63,7 @@ editor = {
|
|||
for (var i = 0; i < sources.length; i++) {
|
||||
source = sources[i];
|
||||
editor.sources[source.id] = source;
|
||||
source.layer = L.imageOverlay('/api/sources/'+source.id+'/image/', source.bounds, {opacity: 0.3});
|
||||
source.layer = L.imageOverlay('/api/sources/'+source.id+'/image/', L.GeoJSON.coordsToLatLngs(source.bounds), {opacity: 0.3});
|
||||
editor._sources_control.addOverlay(source.layer, source.name);
|
||||
}
|
||||
if (sources.length) editor._sources_control.addTo(editor.map);
|
||||
|
@ -322,8 +322,9 @@ editor = {
|
|||
$.getJSON('/api/editor/geometrystyles/', function(geometrystyles) {
|
||||
editor.geometrystyles = geometrystyles;
|
||||
$.getJSON('/api/editor/bounds/', function(bounds) {
|
||||
editor.map.setMaxBounds(bounds.bounds);
|
||||
editor.map.fitBounds(bounds.bounds, {padding: [30, 50]});
|
||||
bounds = L.GeoJSON.coordsToLatLngs(bounds.bounds);
|
||||
editor.map.setMaxBounds(bounds);
|
||||
editor.map.fitBounds(bounds, {padding: [30, 50]});
|
||||
editor.init_sidebar();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue