diff --git a/package.json b/package.json index 715c152c..c48b0da3 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "leaflet.locatecontrol": "^0.79.0", "leaflet.markercluster": "^1.5.3", "leaflet.path.drag": "0.0.6", - "leaflet.photon": "0.9.0", + "leaflet.photon": "0.9.1", "osmtogeojson": "^3.0.0-beta.3", "simple-statistics": "^7.8.3", "togpx": "^0.5.4", diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index cfbd78bf..160d856c 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -1237,6 +1237,7 @@ U.StarControl = L.Control.extend({ U.Search = L.PhotonSearch.extend({ initialize: function (map, input, options) { this.options.placeholder = L._('Type a place name or coordinates') + this.options.location_bias_scale = 0.5 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() @@ -1276,6 +1277,7 @@ U.Search = L.PhotonSearch.extend({ // Only numbers, abort. if (/^[\d .,]*$/.test(this.input.value)) return // Do normal search + this.options.includePosition = this.map.getZoom() > 10 L.PhotonSearch.prototype.search.call(this) },