You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
We need a camera-like API that allows not only timing curves for viewport changes, but also setting multiple properties simultaneously. Tickets forthcoming, but right now, you can't change both the center/zoom and the heading at the same time, but animated.
Apple MapKit's MKMapCamera API is nice model here, which can later be extended for pitch as well.
We recently rationalized this on the gl-js side so that camera methods like jumpTo, easeTo, and flyTo all take the same options object of camera parameters (center, zoom, bearing, and pitch). Any omitted parameter defaults to the current value. We should port these method names and parameter conventions to native, although instead of a generic object we'll need to have something like:
I’ve started to unify some of the Transform methods to funnel into a single method that handles animation. Work is taking place on the 1ec5-camera-1834 branch. I’ve left out pitch for now, since that is unimplemented.
The eventual Cocoa Touch API will probably use different terminology than what we’ve used up to this point: per MKMapCamera, we’ll probably have fields called centerCoordinate, heading (instead of rotation), pitch, and altitude (instead of zoom). Who knows, someday we may also want a bank property too.
Activity
1ec5 commentedon Jul 5, 2015
cc @jfirebaugh, who was looking at ways to implement this at the mbgl level.
jfirebaugh commentedon Jul 6, 2015
We recently rationalized this on the gl-js side so that camera methods like
jumpTo,easeTo, andflyToall take the same options object of camera parameters (center, zoom, bearing, and pitch). Any omitted parameter defaults to the current value. We should port these method names and parameter conventions to native, although instead of a generic object we'll need to have something like:Related: #256.
[-]mirror camera API[/-][+]Implement camera API[/+]First pass at simultaneous pan and rotate
1ec5 commentedon Jul 30, 2015
I’ve started to unify some of the
Transformmethods to funnel into a single method that handles animation. Work is taking place on the 1ec5-camera-1834 branch. I’ve left out pitch for now, since that is unimplemented.The eventual Cocoa Touch API will probably use different terminology than what we’ve used up to this point: per MKMapCamera, we’ll probably have fields called
centerCoordinate,heading(instead ofrotation),pitch, andaltitude(instead ofzoom). Who knows, someday we may also want abankproperty too.MGLUserTrackingModeFollowWithCourse
CameraOptions