Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Implementation of flyTo. - #3171

Merged
adam-mapbox merged 1 commit into
masterfrom
adam_256_flyTo
Dec 10, 2015
Merged

adam-mapbox merged 1 commit into
masterfrom
adam_256_flyTo

Conversation

@adam-mapbox

Copy link
Copy Markdown
Contributor

@1ec5 @jfirebaugh @incanus @bleege @mapbox/mobile

Open for suggestions about the API on MGLMapView.

@adam-mapbox

Copy link
Copy Markdown
Contributor Author

Comment thread include/mbgl/ios/MGLMapView.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this declaration needs a documentation comment. I would say something about the trajectory being parabolic versus -setCamera which transitions the viewport properties linearly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@incanus

incanus commented Dec 3, 2015

Copy link
Copy Markdown
Contributor

As on #3172, I think we should take a swipe at Android implementation soon after we're happy and land this.

Refs #2805 @zugaldia

@bleege

bleege commented Dec 10, 2015

Copy link
Copy Markdown
Contributor

Android Implementation is going to be #3244

@bleege bleege mentioned this pull request Dec 11, 2015
@adam-mapbox
adam-mapbox deleted the adam_256_flyTo branch December 11, 2015 23:05
@jfirebaugh jfirebaugh mentioned this pull request Dec 15, 2015
1ec5 added a commit that referenced this pull request Dec 15, 2015
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants