React-mapbox-gl: Cluster component not updating if child Markers change

Created on 27 Mar 2017  路  6Comments  路  Source: alex3165/react-mapbox-gl

Thought I'd try out the new Marker and Cluster components (awesome idea!), and noticed that whilst the child Markers show/hide on a query change, the Clusters always remain the same from first load.

Same pointCount and coords, even if the children underneath change or no longer exist. Also means no new Clusters appear for Markers that didn't exist on first load and start with a parent Cluster (or were outside of the getBounds on first load). Tried out the demo and but the data doesn't change so couldn't reproduce the issue there. Looked at the component as well, and only saw mapChange updating the pointCount, but not for a new query.

Seeing as the child Markers update happily along with other map components, I couldn't think what the issue with Clusters not updating.

The chance of html Markers makes me not want to switch back to Layers, so any help is appreciated!

All 6 comments

@drekli I will close this issue as Cluster component changed with v2. Feel free to let me know if it still doesn't work.

Sure thing, I'll look forward to testing that! Thanks for the heads up on v2 and all the hard work!

this is still happening even on version 2

@marek-sed, @Wykks will look into that

@Wykks I looked at the code I think I found the issue and was able to fix it properly.
Hope it helps

286

Released with version 2.0.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benderlidze picture benderlidze  路  3Comments

spybaby1 picture spybaby1  路  4Comments

kolharsam picture kolharsam  路  4Comments

cyrilchapon picture cyrilchapon  路  3Comments

madeleinejohanson picture madeleinejohanson  路  4Comments