Skip to content

Commit a7d4690

Browse files
committed
fix: change deprecated event
1 parent 9f2cafe commit a7d4690

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/demo-fr.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
if (lastStyle != targetEnd) {
177177
lastStyle = targetEnd;
178178
map.setStyle(styles[lastStyle]);
179-
map.once('style', (event) => {
179+
map.once('styledata', (event) => {
180180
if (event.dataType == 'style') {
181181
effect();
182182
}
@@ -185,10 +185,10 @@
185185
effect();
186186
}
187187
} else {
188-
if (lastStyle != 'tourism') {
188+
if (lastStyle !== 'tourism') {
189189
lastStyle = 'tourism';
190190
map.setStyle(styles[lastStyle]);
191-
map.once('style', (event) => {
191+
map.once('styledata', (event) => {
192192
if (event.dataType == 'style') {
193193
effect();
194194
}

0 commit comments

Comments
 (0)