native.newMapView -- "isAnimated" flag on setRegion

I’d like to use the animate feature when going to a new location on a mapview. When the animation starts I’d like to show some text like “moving to your next location” then change the text once the location (region) is set. Basic questions:

When setting the “isAnimated” flag:

object:setRegion( latitude, longitude, latitudeSpan, longitudeSpan [, isAnimated] )

to “true” is there not an event triggered to know when the animation has ended?

Another possibility would be if the animation time is fixed - is it?

Thanks in advance,

David

I can’t find where we are setting a time for the animation. It looks like it’s being just passed through as a true/false flag to the native OS. On iOS Apple doesn’t specify the speed. I couldn’t find a reference in Google’s docs either.

Given that zooming from one side of New Hampshire to the other doesn’t take much map movement, but zooming from western Alaska to the east side of New Hampshire would look weird zooming at hyper speeds, I’m sure there is some variability.

My advice would be to set up a couple of tests. setRegion on a couple of close locations and see how fast it zooms and then do the same with do far apart places and see if the speed is much more rapid with the distant locations vs the close locations. Of course you will need to test both Android and iOS since they are different engines driving it.

Rob

After some searching it looks like with iOS one can use a delegate - mapView:regionDidChangeAnimated:

https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapViewDelegate_Protocol/index.html

Think I’ll have to do some various sampling - had to ask just in case. Thanks Rob.

I can’t find where we are setting a time for the animation. It looks like it’s being just passed through as a true/false flag to the native OS. On iOS Apple doesn’t specify the speed. I couldn’t find a reference in Google’s docs either.

Given that zooming from one side of New Hampshire to the other doesn’t take much map movement, but zooming from western Alaska to the east side of New Hampshire would look weird zooming at hyper speeds, I’m sure there is some variability.

My advice would be to set up a couple of tests. setRegion on a couple of close locations and see how fast it zooms and then do the same with do far apart places and see if the speed is much more rapid with the distant locations vs the close locations. Of course you will need to test both Android and iOS since they are different engines driving it.

Rob

After some searching it looks like with iOS one can use a delegate - mapView:regionDidChangeAnimated:

https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapViewDelegate_Protocol/index.html

Think I’ll have to do some various sampling - had to ask just in case. Thanks Rob.