Merge pull request #1268 from umap-project/search-bounds

When map has max bounds, use those bounds for limiting search
This commit is contained in:
Yohan Boniface 2023-08-21 17:20:30 +02:00 committed by GitHub
commit a997b5454b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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