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

flyTo equivalent #256

Closed
mourner opened this issue May 27, 2014 · 13 comments · Fixed by #2193
Closed

flyTo equivalent #256

mourner opened this issue May 27, 2014 · 13 comments · Fixed by #2193
Labels
feature GL JS parity For feature parity with Mapbox GL JS

Comments

@mourner
Copy link
Member

mourner commented May 27, 2014

It would be nice to port ballistic zoom-pan from llmr, as it is usually very useful in demos. I might look into it.

@incanus
Copy link
Contributor

incanus commented May 27, 2014

Can you give an example of this? Is this where it zooms way high, then back down to earth?

@mourner
Copy link
Member Author

mourner commented May 27, 2014

@incanus yep, that's it. Useful when you need to smoothly animate the view to some place no matter how far it is. E.g. it was used actively in the auto demo, and Mapbox party demo where it cycled between different places around the world. It can also rotate during animation.

@jfirebaugh jfirebaugh changed the title zoomPanTo equivalent flyTo equivalent May 26, 2015
@jfirebaugh
Copy link
Contributor

We should emulate mapbox/mapbox-gl-js#1215 here for all the methods related to map view options. It would be nice if C++14 supported C99's designated initializers. In lieu of that we'll probably want to support a chaining syntax:

map.jumpTo(mbgl::ViewOptions().center({lat, lng}).zoom(4.2).bearing(45));

@jfirebaugh jfirebaugh added the GL JS parity For feature parity with Mapbox GL JS label May 26, 2015
@1ec5
Copy link
Contributor

1ec5 commented May 26, 2015

How about a struct (call it Viewport or somesuch) that specifies center, zoom, and bearing (and someday pitch)? It would be analogous to the MGLCoordinateRegion or MGLMapCamera that we’ll need to address #1092 and #1643.

@1ec5
Copy link
Contributor

1ec5 commented May 26, 2015

It would be nice if C++14 supported C99's designated initializers.

Ah, using a struct would be less convenient in the absence of designated initializers or compound literals. clang++ supports both in C++14, but we’ve enabled pedantic warnings as errors, forbidding their use in this codebase.

@jfirebaugh
Copy link
Contributor

A struct what I was implicitly going for with ViewOptions -- the question is what syntax is most convenient for setting some, but not all, of its members, where the unspecified members use the current map values.

@1ec5 1ec5 mentioned this issue Aug 28, 2015
14 tasks
@incanus
Copy link
Contributor

incanus commented Aug 28, 2015

Camera API is close to landing: #2193

@1ec5 1ec5 reopened this Sep 7, 2015
@1ec5
Copy link
Contributor

1ec5 commented Sep 7, 2015

flyTo still needs to be implemented. jumpTo is implemented though.

@incanus
Copy link
Contributor

incanus commented Sep 7, 2015

Whoops, good catch.

1ec5 added a commit that referenced this issue Sep 14, 2015
I’m sure I’ll begin to understand what all these letters mean once I start debugging.

Fixes #256.
@1ec5 1ec5 mentioned this issue Oct 26, 2015
@incanus incanus added the P1 label Nov 4, 2015
@incanus
Copy link
Contributor

incanus commented Dec 2, 2015

Piggybacking off of @adam-mapbox's work in this branch in c788cea and some chat discussion, we might look into temporarily disabling compression in our SQLite caching backend to see if it helps with drawing after jumps. Profiling would probably be in order too, just to see what is the bottleneck (if possible).

@incanus
Copy link
Contributor

incanus commented Dec 2, 2015

That'd be around here and here.

@incanus
Copy link
Contributor

incanus commented Dec 2, 2015

Per some chat discussion, we could also look into loading 1/4 as many parent tiles or even 1/16 as many grandparent tiles for the destination as a way to quickly warm the cache so that something could be drawn closer to as soon as we land.

@jfirebaugh
Copy link
Contributor

#3171

acalcutt pushed a commit to acalcutt/mapbox-gl-native that referenced this issue Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature GL JS parity For feature parity with Mapbox GL JS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants