[TASK] Configurable reverse geocoding server
This commit is contained in:
parent
7d838dd7a1
commit
42fe2daed2
@ -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):
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user