diff options
Diffstat (limited to 'modern/src/map/switcher')
-rw-r--r-- | modern/src/map/switcher/switcher.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/switcher/switcher.js b/modern/src/map/switcher/switcher.js index 848abc40..76710ced 100644 --- a/modern/src/map/switcher/switcher.js +++ b/modern/src/map/switcher/switcher.js @@ -38,7 +38,7 @@ export class SwitcherControl { styleElement.type = 'button'; styleElement.innerText = style.title; styleElement.dataset.id = style.id; - styleElement.dataset.uri = JSON.stringify(style.uri); + styleElement.dataset.style = JSON.stringify(style.style); styleElement.addEventListener('click', (event) => { const { target } = event; if (!target.classList.contains('active')) { @@ -61,7 +61,7 @@ export class SwitcherControl { onSelectStyle(target) { this.onBeforeSwitch(); - this.map.setStyle(JSON.parse(target.dataset.uri), { + this.map.setStyle(JSON.parse(target.dataset.style), { diff: false, }); |