-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markers sometimes not appearing on initial render #180
Comments
Seeing the same thing here: #171. Clusters won't update unless you drag the map around. |
@pdugan20 just looked through your code sample, I'm wondering if this isn't because we're defining custom cluster components. I know there's at least one place in the code where it introspects the cluster's props (looking at it's coordinates prop). It looks like the author of this library isn't going to respond too quickly so please share anything you discover and I'll do the same. |
As far as I cant tell this is because of the memoization of children in the |
The above seems to have been a red herring. @pdugan20 the below patch seems to fix the problem for me.
Can you add that line to ClusteredMapView.js on line 93 immediately above where the bBox (bounding box) is computed and let me know if that fixes some of your issues? I'd like to get some more validation on this small fix. If it works I'll open a PR. |
Opened a PR for this here |
Haven't had a chance to test this yet but my original problems were related to the region prop not updating correctly so willing to bet this would likely improve on what I was seeing. |
Fixed in version |
First I'd like to thank you for the work on this library, it's been very helpful.
I'm running into an issue where sometimes markers and custom clusters aren't appearing on the initial render of the map. Digging in with React Native Debugger, I see that the memo component wrapping the
MapView
has the expected number of children (which are the markers I'm passing in). TheMapView
, however, has 4 children that are empty arrays. Moving the map or changing the zoom level makes everything render correctly. Please let me know if any further information would be helpful.The text was updated successfully, but these errors were encountered: