Answer the question
In order to leave comments, you need to log in
Vue2-mapbox - how to use dynamic parameters?
I can't figure out how to call map events. For example, I have coordinates and I want to move the map to another location by clicking on the button. Or here's another example, by clicking on the button to change the map zoom. There are map input parameters:
:map-options="mapOption" // на самом компоненте карты
// а это в data
mapOption: {
style: 'mapbox://styles/mapbox/dark-v9',
center: [
this.$store.state.goods[this.$store.state.currentMap].x,
this.$store.state.goods[this.$store.state.currentMap].y
],
zoom: this.$store.state.goods[this.$store.state.currentMap].zoom
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question