-
Notifications
You must be signed in to change notification settings - Fork 9
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
Android custom map marker has bad performance #476
Comments
Update to this is that adding trackViewChanges={false} to the marker has helped a lot (I was previously adding it to the mapview, which was wrong). There still seems to be an issue where the hearts don’t always render. Some have noted that you should track changes while the markers are loading then change to false after they’ve loaded. I’ll edit this comment later with the examples of that that I found. |
react-native-maps/react-native-maps#1705 (comment)
Others use a timeout of like .4 seconds and then set it to false when the pins are first loading. Seems sketchy, though. |
I got a slow marker in android too but here is my solution set Example for cluster
|
Resolved via switching to rnmapbox |
Right now we're using default markers on Android, since the custom ones we've tried really hurt performance. With the latest version 1.x of react-native-maps, this still seems to be the case. There have been various issues over the years about this, but no clear indication that it's been fixed. Recent one react-native-maps/react-native-maps#4161 (not entirely sure if that's our issue)
This person claims they solved it: https://dev.to/ajmal_hasan/react-native-map-optimisation-59na
But I haven't dug deep into that post. Almost seems like their solution is to merely add
trackViewChanges={false}
for Android, which is certainly something I've already tried.Official docs: https://github.com/react-native-maps/react-native-maps#rendering-a-marker-with-a-custom-image
say that using <Image ...> is better than . I've tried both. But perhaps I didn't do it perfectly?
Another general note is that Expo Go performance is, overall, worse than using actual builds. That's because Expo Go is doing a bunch of bug monitoring and stuff. So sometimes you need actual builds to see true performance. But I'm sure that usage through Expo Go would give us an idea if some solution is working.
The text was updated successfully, but these errors were encountered: