-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Expose GoogleMaps iOS SDK icon property to improve Marker rendering performance #2650
Expose GoogleMaps iOS SDK icon property to improve Marker rendering performance #2650
Conversation
Thanks for the PR ❤️ I wonder of we could unify the @alvelig thoughts ? and 🐽 |
@rborn on iOS you can use both Let me check if I can make it compatible with android, for not having to differentiate it on Marker props |
I managed to support Using |
@victormartingarcia looks good, thanks. |
I've tested and
Just like with
Haven't found anything about Marker size in Google Maps SDKs docs... |
@victormartingarcia let's wait a little for @alvelig to reply (if) and then we'll merge 🎉 |
Related to #1491 |
I'm not sure why this wasn't caught in the tests that ran on this PR but I am following up with the following #2651 |
…x.d.ts ### Does any other open PR do the same thing? No. ### What issue is this PR fixing? With TypeScript, trying to use the Marker's icon property results in an error, since the `index.d.ts` does not yet declare the property that was added in react-native-maps#2650. ### How did you test this PR? Tested by editing the `index.d.ts` locally. Since there are no functional changes, this is a trivial change.
### Does any other open PR do the same thing? No. ### What issue is this PR fixing? With TypeScript, trying to use the Marker's icon property results in an error, since the `index.d.ts` does not yet declare the property that was added in #2650. ### How did you test this PR? Tested by editing the `index.d.ts` locally. Since there are no functional changes, this is a trivial change.
…erformance (react-native-maps#2650) * Added icon property - react-native-maps#1491 * fixed MapMarker.js indentation * Added support for Marker icon property on android * Added support for Marker icon property on android
…x.d.ts (react-native-maps#2705) ### Does any other open PR do the same thing? No. ### What issue is this PR fixing? With TypeScript, trying to use the Marker's icon property results in an error, since the `index.d.ts` does not yet declare the property that was added in react-native-maps#2650. ### How did you test this PR? Tested by editing the `index.d.ts` locally. Since there are no functional changes, this is a trivial change.
Does any other open PR do the same thing?
This PR is based on #1491 changeset
It hasn't been merged (presumably unsolved conflicts), but I see Marker tracksViewChange property is already exposed on master branch, so it makes sense to expose Marker icon property as well
What issue is this PR fixing?
Rendering Markers on iOS using Google Maps have some performance issues (see #2616, #1031, #2575 ..)
Some people have solved that with some extra logic tweaking tracksViewChange property (see #1031 (comment) ), but as Google explains in the SDK docs, for static Markers is much better to use icon property.
Using this icon property solves all iOS performance issues, making the map much smoother :)
How did you test this PR?
This fix has been tested on iPhone simulator and real devices (iPhone 6 and iPhone X) with extremely good results.
On Android,
icon
property works likeimage
property, as Android SDK does not differentiate between static image Markers and View-based onesExample