diff options
author | Anton Tananaev <anton@traccar.org> | 2023-08-27 17:37:50 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-08-27 17:37:50 -0700 |
commit | 4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f (patch) | |
tree | c8dd6b67e2e267f1ec4af1c2fc8da276161182b4 /modern/src/map | |
parent | 289a968c3f9d8d95b6bb6f346135480cfc246a75 (diff) | |
download | trackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.tar.gz trackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.tar.bz2 trackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.zip |
Add dark map option
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/core/useMapStyles.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modern/src/map/core/useMapStyles.js b/modern/src/map/core/useMapStyles.js index b09658fc..f1837dab 100644 --- a/modern/src/map/core/useMapStyles.js +++ b/modern/src/map/core/useMapStyles.js @@ -30,7 +30,7 @@ export default () => { const t = useTranslation(); const mapTilerKey = useAttributePreference('mapTilerKey'); - const locationIqKey = useAttributePreference('locationIqKey'); + const locationIqKey = useAttributePreference('locationIqKey') || 'pk.0f147952a41c555a5b70614039fd148b'; const bingMapsKey = useAttributePreference('bingMapsKey'); const tomTomKey = useAttributePreference('tomTomKey'); const hereKey = useAttributePreference('hereKey'); @@ -41,7 +41,13 @@ export default () => { { id: 'locationIqStreets', title: t('mapLocationIqStreets'), - style: `https://tiles.locationiq.com/v3/streets/vector.json?key=${locationIqKey || 'pk.0f147952a41c555a5b70614039fd148b'}`, + style: `https://tiles.locationiq.com/v3/streets/vector.json?key=${locationIqKey}`, + available: true, + }, + { + id: 'locationIqDark', + title: t('mapLocationIqDark'), + style: `https://tiles.locationiq.com/v3/dark/vector.json?key=${locationIqKey}`, available: true, }, { |