Fixed
Status Update
Comments
br...@google.com <br...@google.com> #2
Our engineering team had a go at reproducing this condition and couldn't. Could you please build us a reproduction case along the lines of https://github.com/domesticmouse/MovingMarkerPosition ?
br...@google.com <br...@google.com> #3
Fixed in version 1.10.0. Thanks for the report!
gg...@lyft.com <gg...@lyft.com> #4
The reproduction case is actually a lot more complicated than originally expected. It involves removing markers at the same time as animating different markers. In the example project I attached, you have to press the button at the bottom of the map in order to trigger this simultaneous changing animation with marker removal. If you do it quickly you can see the markers flash at the bottom of the screen.
In ViewController.swift, there is a commented out "executeAfter(0.0)" around the marker removals. You'll see that if you uncomment this, you will not see the markers flashing.
Thank you!
GitHub link:https://github.com/dominostars/GoogleMapsAnimationGlitch
NOTE: I included the pods folder and podfile.lock, so you should be able to clone the repository, open up .xcworkspace, and have it build immediately
(I also attached the main class where the action is happening)
In ViewController.swift, there is a commented out "executeAfter(0.0)" around the marker removals. You'll see that if you uncomment this, you will not see the markers flashing.
Thank you!
GitHub link:
NOTE: I included the pods folder and podfile.lock, so you should be able to clone the repository, open up .xcworkspace, and have it build immediately
(I also attached the main class where the action is happening)
br...@google.com <br...@google.com> #5
Thanks for the full reproduction sample!
gg...@gmail.com <gg...@gmail.com> #6
Hi Brett, do you have an update on this? We're seeing this crop up very frequently. Are there any possible workarounds that don't involve executing map removals on the next run loop everywhere we remove a marker from the map? Thank you!
br...@google.com <br...@google.com> #8
Version 1.11.0: Workaround issues with core animation that caused markers to jump.
Description
We want to animate from A to C, but partway through we decide we want to animate to D instead. Our pseudocode looks as follows:
let marker = GMSMarker(position: A)
CATransaction.setAnimationDuration(10)
marker.position = C
delay(5) {
// At this point, the marker is near position B
CATransaction.setAnimationDuration(10)
marker.position = D
}
Expected behavior: The previous animation is cancelled, and the marker should be animated from wherever it is now (near B) to D over 10 seconds.
Actual behavior: The marker briefly flashes at position C, but then flashes back to B and then animates to D as expected.
Operating system version: iOS 8.4
Google Maps SDK for iOS version: 1.10.1
Hardware model: iPhone 6 + iOS Simulator (any device)