From a743b23a32712c89b1b92bf7105d8fb4f9ec9cca Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 1 Nov 2022 16:31:27 -0700 Subject: Predefine Google maps --- modern/src/map/core/useMapStyles.js | 30 ++++++++++++++++++++++++++++++ modern/src/resources/l10n/en.json | 3 +++ 2 files changed, 33 insertions(+) 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 @@ -73,6 +73,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'), 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", -- cgit v1.2.3