Skip reverse-geocoding if CONFIG.location.label already set
This commit is contained in:
1 parent
5c3a29a12e
commit
3241721f2b
2 files changed
+5
-1
No files matched your search
@@ -1665,7 +1665,10 @@ window.weatherThemes = {
|
||||
|
||||
// Reverse geocode lat/lon to a place name using Nominatim (OpenStreetMap).
|
||||
// Free, no API key required. Has a 1 req/sec rate limit.
|
||||
// Skipped if a custom label is already configured (luxury: user can
|
||||
// set their own place name in CONFIG.location.label).
|
||||
function reverseGeocode(lat, lon) {
|
||||
if (window.CONFIG && window.CONFIG.location && window.CONFIG.location.label) return;
|
||||
var url = 'https://nominatim.openstreetmap.org/reverse?format=json&lat=' +
|
||||
lat + '&lon=' + lon + '&zoom=10&addressdetails=1';
|
||||
fetch(url, {
|
||||
|
||||
Reference in new issue
Block a user