diff --git a/README.md b/README.md index 7042072..5a2d2c5 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - Improved cross browser/device support THX@BrowserStack - Leaflet with patch to avoid IE/Edge crashes - Add yarn package manager in favor of npm (npm still works) +- Configurable reverse geocoding server - [A lot more in commit history](https://github.com/ffrgb/meshviewer/commits/develop) # Demo (embedded): diff --git a/config.json b/config.json index 770036e..cd4d78c 100644 --- a/config.json +++ b/config.json @@ -25,6 +25,7 @@ ], // String or array of data provider are supported "dataPath": "https://regensburg.freifunk.net/data/", + "reverseGeocodingApi": "https://nominatim.openstreetmap.org/reverse", "siteName": "Freifunk Regensburg", "showContact": false, "maxAge": 14, diff --git a/lib/infobox/location.js b/lib/infobox/location.js index 720b849..0128deb 100644 --- a/lib/infobox/location.js +++ b/lib/infobox/location.js @@ -6,7 +6,7 @@ define(["helper"], function (helper) { sidebarTitle.textContent = "Location: " + d.toString(); el.appendChild(sidebarTitle); - helper.getJSON("https://nominatim.openstreetmap.org/reverse?format=json&lat=" + d.lat + "&lon=" + d.lng + "&zoom=18&addressdetails=0") + helper.getJSON(config.reverseGeocodingApi + "?format=json&lat=" + d.lat + "&lon=" + d.lng + "&zoom=18&addressdetails=0") .then(function (result) { if (result.display_name) { sidebarTitle.textContent = result.display_name;