By using shapesource and symbol layer to dynamically load markers with remote image icons (an http url).
Things works fine for the initialize shapesource with an icon object.
(with the format : { uri : 'http...'} in iconImages object)
But when adding dynamically.
The icons doesn't appear on the map.
Seems like it's not updating after the creation.
Any ideas?
Here is an example app and trying to reproduce it
https://github.com/KevinHu2014/testMapbox
@nitaliano
Any update on this ?
Thanks.
I just tried using the same code as you and don't see any issue. Do you still have the issue ? I'm using @mapbox/react-native-mapbox-gl 6.1.0
@Gp2mv3 Yes , I still encounter the issue. I still can't dynamically update the markers. Is it possible to share your code ?
Same issue. Any solutions? @KevinHu2014 馃槪
@KevinHu2014 I try to add key property on the ShapeSource component, then increase it while the shape or images updates, it works.
But i think it's a hack way, is there an official solution?
@KevinHu2014 I try to add
keyproperty on theShapeSourcecomponent, then increase it while theshapeorimagesupdates, it works.But i think it's a hack way, is there an official solution?
I'm facing the same issue and your method works for me. Seems to be hacky but at least it works for now. I think this is a limitation and has got to do with the library itself.
@KevinHu2014 I try to add
keyproperty on theShapeSourcecomponent, then increase it while theshapeorimagesupdates, it works.But i think it's a hack way, is there an official solution?
@yqz0203 I tried with the key update on ShapeSource but it won't work either, the only way I found until now is to put a key on the MapView, but it is really a bad user experience because the whole map reloads... can you share your working piece of code ?
Most helpful comment
@KevinHu2014 I try to add
keyproperty on theShapeSourcecomponent, then increase it while theshapeorimagesupdates, it works.But i think it's a hack way, is there an official solution?