K
K
kentos2019-03-30 19:12:04
Vue.js
kentos, 2019-03-30 19:12:04

How to fix a point on the map?

Hello, I display the coordinates on the map, but they only appear when I switch to another page, then back

// Code in component map
 
 this.coords.map((markers) => {
      const marker = new H.map.Marker({lat: markers[0], lng: markers[1]});
            map.addObject(marker);
    })
 
// Props
 
props: {
coords: [],
}
 
 
//Place where used my component
 
<MapComp
    :coords= getTrips></MapComp>
 
computed: {
 getTrips() {
      return this.$store.getters.locationsTracking
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question