aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/overlay/useMapOverlays.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-12 09:34:33 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-12 09:34:33 -0700
commit2179dd19dd0dbdded0b62d0d31ba1b3162ee145f (patch)
treec55cec0186e93f15b95e82980c00c113effe1dfd /modern/src/map/overlay/useMapOverlays.js
parent9b2d9f747812a43282614304f9ae7a37e71523c1 (diff)
downloadtrackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.tar.gz
trackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.tar.bz2
trackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.zip
Add HERE maps and traffic
Diffstat (limited to 'modern/src/map/overlay/useMapOverlays.js')
-rw-r--r--modern/src/map/overlay/useMapOverlays.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/modern/src/map/overlay/useMapOverlays.js b/modern/src/map/overlay/useMapOverlays.js
index e7ea7322..d82397d6 100644
--- a/modern/src/map/overlay/useMapOverlays.js
+++ b/modern/src/map/overlay/useMapOverlays.js
@@ -17,6 +17,7 @@ export default () => {
const openWeatherKey = useAttributePreference('openWeatherKey');
const tomTomKey = useAttributePreference('tomTomKey');
+ const hereKey = useAttributePreference('hereKey');
const customMapOverlay = useSelector((state) => state.session.server?.overlayUrl);
return [
@@ -76,6 +77,15 @@ export default () => {
attribute: 'tomTomKey',
},
{
+ id: 'hereFlow',
+ title: t('mapHereFlow'),
+ source: sourceCustom(
+ [1, 2, 3, 4].map((i) => `https://${i}.traffic.maps.ls.hereapi.com/maptile/2.1/flowtile/newest/normal.day/{z}/{x}/{y}/256/png8?apiKey=${hereKey}`),
+ ),
+ available: !!hereKey,
+ attribute: 'hereKey',
+ },
+ {
id: 'custom',
title: t('mapOverlayCustom'),
source: sourceCustom(customMapOverlay),