aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-08-27 17:37:50 -0700
committerAnton Tananaev <anton@traccar.org>2023-08-27 17:37:50 -0700
commit4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f (patch)
treec8dd6b67e2e267f1ec4af1c2fc8da276161182b4 /modern/src
parent289a968c3f9d8d95b6bb6f346135480cfc246a75 (diff)
downloadtrackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.tar.gz
trackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.tar.bz2
trackermap-web-4fc61613ad4b7b7ffd23d8a962e9138b37ab2b3f.zip
Add dark map option
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/map/core/useMapStyles.js10
-rw-r--r--modern/src/resources/l10n/en.json1
2 files changed, 9 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,
},
{
diff --git a/modern/src/resources/l10n/en.json b/modern/src/resources/l10n/en.json
index 7933abd8..d46eb533 100644
--- a/modern/src/resources/l10n/en.json
+++ b/modern/src/resources/l10n/en.json
@@ -355,6 +355,7 @@
"mapMapTilerHybrid": "MapTiler Hybrid",
"mapMapTilerKey": "MapTiler API Key",
"mapLocationIqStreets": "LocationIQ Streets",
+ "mapLocationIqDark": "LocationIQ Dark",
"mapLocationIqKey": "LocationIQ Access Token",
"mapTomTomBasic": "TomTom Basic",
"mapTomTomFlow": "TomTom Traffic Flow",