Browse Source

CategoryOverpass.show(): when showing details, zoom to bounding box (or zoom 16)

master
parent
commit
6e4dd5b089
  1. 10
      src/CategoryOverpass.js

10
src/CategoryOverpass.js

@ -295,7 +295,15 @@ CategoryOverpass.prototype.get = function (id, callback) {
}
CategoryOverpass.prototype.show = function (id, options, callback) {
this.layer.show(id, options, callback)
this.layer.show(id, options, function (err, data) {
if (!err) {
if (options.showDetails) {
this.map.flyToBounds(data.object.bounds.toLeaflet(), { maxZoom: 16 })
}
}
callback(err, data)
})
}
CategoryOverpass.prototype.notifyPopupOpen = function (object, popup) {

Loading…
Cancel
Save