When map has max bounds, use those bounds for limiting search

fix #1264
This commit is contained in:
Yohan Boniface 2023-08-21 10:06:54 +02:00
parent fb6b0f4d9b
commit 311809520c

View file

@ -1272,6 +1272,7 @@ L.U.Search = L.PhotonSearch.extend({
initialize: function (map, input, options) {
L.PhotonSearch.prototype.initialize.call(this, map, input, options)
this.options.url = map.options.urls.search
if (map.options.maxBounds) this.options.bbox = map.options.maxBounds.toBBoxString()
},
onBlur: function (e) {