-
-
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
Custom markers doesn't always update on android #2048
Comments
Same issue with you but in my case I don't call |
Where exactly you set math.random? |
Could it be that this is a duplicate of #1288 ? |
No, markers are moving fine it’s image for marker that is not update. For example: you have two markers in a view region and two buttons one should update image one one and second on another. |
Ah, thanks for the clarification … I get it now :) |
@vvusts I updated marker key, based on this explanation. |
* master: (168 commits) Adding overlaying components details (react-native-maps#2425) docs: pin color limitations for android (react-native-maps#2429) Revert "Added MBTiles support for iOS and Android (react-native-maps#2208)" (react-native-maps#2387) Added MBTiles support for iOS and Android (react-native-maps#2208) Fix disabling the toolbar and my location button (react-native-maps#2317) Fixes warnings about self (react-native-maps#2341) Android: Fix lineCap of Polyline (react-native-maps#2375) Update installation.md (react-native-maps#2381) update doc (react-native-maps#2363) zIndex doesn't work when the map moves in iOS 11 (react-native-maps#2359) Fix readme formatting (react-native-maps#2358) add support for calloutAnchor with GoogleMaps on iOS; fixes react-native-maps#1852 (react-native-maps#2351) Added animateToNavigation method to MapView (react-native-maps#2049) Add react-native@^0.55 to peerDependencies (react-native-maps#2332) Fix custom marker updates on android react-native-maps#1611 react-native-maps#2048 [iOS] Prefix or eliminate globals in AIRMapMarker (react-native-maps#2306) Fix CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warnings (react-native-maps#2154) Fix for compile error (react-native-maps#2215). (react-native-maps#2232) Make tiles display at the same physical size regardless of pixel dens… (react-native-maps#2248) Added support of lineDashPattern polyline prop to iOS Google Maps (react-native-maps#2243) ... # Conflicts: # lib/components/MapMarker.js
@vvusts I'm stuck the same issue , have u found the solution ? if yes kindly post it here |
@vuphuctho I tried that way but in real devices the issue still occurs @@ |
…ive-maps#2048 Android: [react-native-maps#2320](react-native-maps#2320) Fixed custom marker updates on Android
Working solution #2734 (comment) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
RN - 0.52
RN Maps - 0.20.1
IOS - work perfect
Android - is problem
I render a lot of markers and use clustering (react-native-maps-super-cluster) but this is related to map.
Markers use custom images like: marker.png and selectedMarker.png
I have list of buttons bellow map. When button is pressed it
.animateToRegion()
where some marker is.Selecting button update state variable like
selectedMarkerId
.In function that render marker I check this variable and based on that set different marker image.
Problem is that on android this image replace doesn't work. And then I move map so marker is not visible and back it again and then image is updated.
I tried with setting key to be
Math.random()
but this make marker flicker as I move map and change selections.Does anybody have problem like this and is there solution?
The text was updated successfully, but these errors were encountered: