From afed83a89ecea62f7f1fd3ae3c99cdf95e52dab6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 21 Aug 2021 16:48:19 -0700 Subject: Fix style --- modern/src/map/Map.js | 6 ++++-- modern/src/map/switcher/switcher.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'modern') diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 3afa48d..6f4875a 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -7,7 +7,9 @@ import React, { import { SwitcherControl } from './switcher/switcher'; import deviceCategories from '../common/deviceCategories'; import { prepareIcon, loadImage } from './mapUtil'; -import { styleCarto, styleMapbox, styleMapTiler, styleOsm } from './mapStyles'; +import { + styleCarto, styleMapbox, styleMapTiler, styleOsm, +} from './mapStyles'; import t from '../common/localization'; import { useAttributePreference } from '../common/preferences'; import palette from '../theme/palette'; @@ -73,7 +75,7 @@ const switcher = new SwitcherControl( { title: t('mapMapboxStreets'), uri: styleMapbox('streets-v11') }, { title: t('mapMapboxOutdoors'), uri: styleMapbox('outdoors-v11') }, { title: t('mapMapboxSatellite'), uri: styleMapbox('satellite-v9') }, - { title: t('mapMapTilerBasic'), uri: styleMapTiler('basic', '${mapTilerKey}') }, + { title: t('mapMapTilerBasic'), uri: styleMapTiler('basic', '{mapTilerKey}') }, ], t('mapOsm'), () => updateReadyValue(false), diff --git a/modern/src/map/switcher/switcher.js b/modern/src/map/switcher/switcher.js index a3805f6..cb7326f 100644 --- a/modern/src/map/switcher/switcher.js +++ b/modern/src/map/switcher/switcher.js @@ -39,7 +39,7 @@ export class SwitcherControl { this.beforeSwitch(); let uri = JSON.parse(srcElement.dataset.uri); if (typeof uri === 'string') { - Object.entries(this.variables).forEach(([key, value]) => uri = uri.replaceAll(`$\{${key}}`, value)); + Object.entries(this.variables).forEach(([key, value]) => uri = uri.replaceAll(`\{${key}}`, value)); } this.map.setStyle(uri); this.afterSwitch(); -- cgit v1.2.3