Improve behaviour of browse pages when no bounding box is available
This commit is contained in:
parent
2d0dcbd9d0
commit
e19e996f1f
2 changed files with 7 additions and 6 deletions
|
@ -61,9 +61,10 @@ $(document).ready(function () {
|
|||
zoom: true,
|
||||
callback: function(extent) {
|
||||
$("#loading").hide();
|
||||
|
||||
if (extent && extent.isValid()) {
|
||||
$("#browse_map .secondary-actions").show();
|
||||
|
||||
if (extent) {
|
||||
$("a.bbox[data-editor=remote]").click(function () {
|
||||
return remoteEditHandler(extent);
|
||||
});
|
||||
|
@ -76,8 +77,6 @@ $(document).ready(function () {
|
|||
$("#object_edit").show();
|
||||
|
||||
updatelinks(map.getCenter(), 16, null, extent, object);
|
||||
} else {
|
||||
$("#small_map").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -140,8 +140,10 @@ L.extend(L.Map.prototype, {
|
|||
|
||||
map._objectLayer.addData(xml);
|
||||
|
||||
if (options.zoom) map.fitBounds(map._objectLayer.getBounds());
|
||||
if (options.callback) options.callback(map._objectLayer.getBounds());
|
||||
var bounds = map._objectLayer.getBounds();
|
||||
|
||||
if (options.zoom && bounds.isValid()) map.fitBounds(bounds);
|
||||
if (options.callback) options.callback(bounds);
|
||||
|
||||
map._objectLayer.addTo(map);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue