Skip to content

Commit

Permalink
[geoext client] - Zoom To Data and not to nearest Scale
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 28, 2018
1 parent ae48213 commit 06ef254
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions geonode/client/templates/geoext/layers/layer_geoext_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@

var zoomToData = function()
{
map.zoomToExtent(extent, true);
map.zoomToExtent(extent, false);
app.mapPanel.center = map.center;
app.mapPanel.zoom = map.zoom;
map.events.unregister('changebaselayer', null, zoomToData);
};
map.events.register('changebaselayer',null,zoomToData);
if(map.baseLayer){
map.zoomToExtent(extent, true);
map.zoomToExtent(extent, false);
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@

var zoomToData = function()
{
map.zoomToExtent(extent, true);
map.zoomToExtent(extent, false);
app.mapPanel.center = map.center;
app.mapPanel.zoom = map.zoom;
map.events.unregister('changebaselayer', null, zoomToData);
};
map.events.register('changebaselayer',null,zoomToData);
if(map.baseLayer){
map.zoomToExtent(extent, true);
map.zoomToExtent(extent, false);
}
}
},
Expand Down

0 comments on commit 06ef254

Please sign in to comment.