diff options
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/core/useMapStyles.js | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/modern/src/map/core/useMapStyles.js b/modern/src/map/core/useMapStyles.js index bbdf0ea9..72f18ebc 100644 --- a/modern/src/map/core/useMapStyles.js +++ b/modern/src/map/core/useMapStyles.js @@ -28,6 +28,7 @@ export default () => { const bingMapsKey = useAttributePreference('bingMapsKey'); const tomTomKey = useAttributePreference('tomTomKey'); const hereKey = useAttributePreference('hereKey'); + const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); const customMapUrl = useSelector((state) => state.session.server?.mapUrl); return [ @@ -151,9 +152,36 @@ export default () => { available: true, }, { + id: 'mapboxStreets', + title: t('mapMapboxStreets'), + style: styleCustom( + [`https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], + ), + available: !!mapboxAccessToken, + attribute: 'mapboxAccessToken', + }, + { + id: 'mapboxOutdoors', + title: t('mapMapboxOutdoors'), + style: styleCustom( + [`https://api.mapbox.com/styles/v1/mapbox/outdoors-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], + ), + available: !!mapboxAccessToken, + attribute: 'mapboxAccessToken', + }, + { + id: 'mapboxSatelliteStreet', + title: t('mapMapboxSatellite'), + style: styleCustom( + [`https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], + ), + available: !!mapboxAccessToken, + attribute: 'mapboxAccessToken', + }, + { id: 'custom', title: t('mapCustom'), - style: styleCustom(customMapUrl), + style: styleCustom([customMapUrl]), available: !!customMapUrl, }, ]; |