diff --git a/umap/settings/base.py b/umap/settings/base.py index d244cbbe..baaa1c3c 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -191,7 +191,8 @@ ENABLE_ACCOUNT_LOGIN = False UMAP_ALLOW_ANONYMOUS = False UMAP_EXTRA_URLS = { 'routing': 'http://www.openstreetmap.org/directions?engine=osrm_car&route={lat},{lng}&locale={locale}#map={zoom}/{lat}/{lng}', # noqa - 'ajax_proxy': '/ajax-proxy/?url={url}&ttl={ttl}' + 'ajax_proxy': '/ajax-proxy/?url={url}&ttl={ttl}', + 'search': 'https://photon.komoot.io/api/?', } UMAP_KEEP_VERSIONS = 10 SITE_URL = "http://umap.org" diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 7a5285d7..e522f540 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -891,6 +891,11 @@ L.U.LocateControl = L.Control.extend({ 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; + }, + onBlur: function (e) { // Overrided because we don't want to hide the results on blur. this.fire('blur');