aboutsummaryrefslogtreecommitdiff
path: root/modern
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
parentf99734fafca208af8fd18f7664c68d81a8adcc72 (diff)
downloadtrackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.tar.gz
trackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.tar.bz2
trackermap-web-a743b23a32712c89b1b92bf7105d8fb4f9ec9cca.zip
Predefine Google maps
Diffstat (limited to 'modern')
-rw-r--r--modern/src/map/core/useMapStyles.js30
-rw-r--r--modern/src/resources/l10n/en.json3
2 files changed, 33 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}`,
diff --git a/modern/src/resources/l10n/en.json b/modern/src/resources/l10n/en.json
index e9474691..9ce29a16 100644
--- a/modern/src/resources/l10n/en.json
+++ b/modern/src/resources/l10n/en.json
@@ -312,6 +312,9 @@
"mapCustomLabel": "Custom map",
"mapCarto": "Carto Basemaps",
"mapOsm": "OpenStreetMap",
+ "mapGoogleRoad": "Google Road",
+ "mapGoogleHybrid": "Google Hybrid",
+ "mapGoogleSatellite": "Google Satellite",
"mapOpenTopoMap": "OpenTopoMap",
"mapBingKey": "Bing Maps Key",
"mapBingRoad": "Bing Maps Road",