aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-01 16:31:27 -0700
committerAnton Tananaev <anton@traccar.org>2022-11-01 16:31:27 -0700
commita743b23a32712c89b1b92bf7105d8fb4f9ec9cca (patch)
treed80250254e339f9d7ff50e037435fab96ef4aeaf /modern/src/map
parentf99734fafca208af8fd18f7664c68d81a8adcc72 (diff)
downloadtrackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.tar.gz
trackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.tar.bz2
trackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.zip
Predefine Google maps
Diffstat (limited to 'modern/src/map')
-rw-r--r--modern/src/map/core/useMapStyles.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/modern/src/map/core/useMapStyles.js b/modern/src/map/core/useMapStyles.js
index affe89c2..b09658fc 100644
--- a/modern/src/map/core/useMapStyles.js
+++ b/modern/src/map/core/useMapStyles.js
@@ -74,6 +74,36 @@ export default () => {
available: true,
},
{
+ id: 'googleRoad',
+ title: t('mapGoogleRoad'),
+ style: styleCustom({
+ tiles: [0, 1, 2, 3].map((i) => `https://mt${i}.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga`),
+ maxZoom: 20,
+ attribution: '© Google',
+ }),
+ available: true,
+ },
+ {
+ id: 'googleSatellite',
+ title: t('mapGoogleSatellite'),
+ style: styleCustom({
+ tiles: [0, 1, 2, 3].map((i) => `https://mt${i}.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga`),
+ maxZoom: 20,
+ attribution: '© Google',
+ }),
+ available: true,
+ },
+ {
+ id: 'googleHybrid',
+ title: t('mapGoogleHybrid'),
+ style: styleCustom({
+ tiles: [0, 1, 2, 3].map((i) => `https://mt${i}.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga`),
+ maxZoom: 20,
+ attribution: '© Google',
+ }),
+ available: true,
+ },
+ {
id: 'mapTilerBasic',
title: t('mapMapTilerBasic'),
style: `https://api.maptiler.com/maps/basic/style.json?key=${mapTilerKey}`,