Skip to content

Commit

Permalink
Google Maps fallback option
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Sep 16, 2024
1 parent 80f03da commit 24cb372
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/map/core/useMapStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,39 @@ export default () => {
id: 'googleRoad',
title: t('mapGoogleRoad'),
style: styleCustom({
tiles: [`google://roadmap/{z}/{x}/{y}?key=${googleKey}`],
tiles: Boolean(googleKey)

Check failure on line 88 in src/map/core/useMapStyles.js

View workflow job for this annotation

GitHub Actions / build

Redundant Boolean call
? [`google://roadmap/{z}/{x}/{y}?key=${googleKey}`]
: [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: Boolean(googleKey),
available: true,
attribute: 'googleKey',
},
{
id: 'googleSatellite',
title: t('mapGoogleSatellite'),
style: styleCustom({
tiles: [`google://satellite/{z}/{x}/{y}?key=${googleKey}`],
tiles: Boolean(googleKey)

Check failure on line 101 in src/map/core/useMapStyles.js

View workflow job for this annotation

GitHub Actions / build

Redundant Boolean call
? [`google://satellite/{z}/{x}/{y}?key=${googleKey}`]
: [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: Boolean(googleKey),
available: true,
attribute: 'googleKey',
},
{
id: 'googleHybrid',
title: t('mapGoogleHybrid'),
style: styleCustom({
tiles: [`google://satellite/{z}/{x}/{y}?key=${googleKey}&layerType=layerRoadmap`],
tiles: Boolean(googleKey)

Check failure on line 114 in src/map/core/useMapStyles.js

View workflow job for this annotation

GitHub Actions / build

Redundant Boolean call
? [`google://satellite/{z}/{x}/{y}?key=${googleKey}&layerType=layerRoadmap`]
: [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: Boolean(googleKey),
available: true,
attribute: 'googleKey',
},
{
Expand Down

0 comments on commit 24cb372

Please sign in to comment.