vue-mapbox icon indicating copy to clipboard operation
vue-mapbox copied to clipboard

Marker color doesn't update

Open transfluxus opened this issue 4 years ago • 1 comments

when a Marker prop color is changed the color doesn't change and looking at the data marker._color does not change...

transfluxus avatar Jan 24 '20 15:01 transfluxus

I am also having this issue. I have all my markers blue, then when a location is selected I have all markers grey except the selected is blue. It seems like this should work by default, but I found an ugly way to force it.

  • I have a forceRender value set to 0
  • Every marker has a unique key that I append with the forceRender value
  • When the map loads I increment the forceRender value by 1
  • Every time I need a marker color to change I increment forceRender which causes all the markers to update

NCLlamas avatar May 02 '21 00:05 NCLlamas