aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/switcher
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-12 09:34:33 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-12 09:34:33 -0700
commit2179dd19dd0dbdded0b62d0d31ba1b3162ee145f (patch)
treec55cec0186e93f15b95e82980c00c113effe1dfd /modern/src/map/switcher
parent9b2d9f747812a43282614304f9ae7a37e71523c1 (diff)
downloadtrackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.tar.gz
trackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.tar.bz2
trackermap-web-2179dd19dd0dbdded0b62d0d31ba1b3162ee145f.zip
Add HERE maps and traffic
Diffstat (limited to 'modern/src/map/switcher')
-rw-r--r--modern/src/map/switcher/switcher.js4
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,
});