Repository navigation
Implementation of flyTo. - #3171
Conversation
There was a problem hiding this comment.
This should take an MGLMapCamera and be called -flyToCamera:withDuration:completionHandler:. This would also allow you to fly to a tilted viewpoint, looking at a particular coordinate from a particular coordinate, and not have to worry about calculating the pitch you want. We don't need more variations on -setCenterCoordinate:, and in fact I'm about to propose that we deprecate some of them.
There was a problem hiding this comment.
A further idea would be to allow the developer to specify a maximum airspeed velocity instead of a duration, but that can happen in a separate PR if desired.
There was a problem hiding this comment.
Also, this declaration needs a documentation comment. I would say something about the trajectory being parabolic versus -setCamera which transitions the viewport properties linearly.
c4ba6d8 to
095a8be
Compare
|
Android Implementation is going to be #3244 |
Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171, causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does. Fixes #3296, fixes #3297.
@1ec5 @jfirebaugh @incanus @bleege @mapbox/mobile
Open for suggestions about the API on MGLMapView.