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

Implement camera API #1834

Closed
Closed

Description

@incanus

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.

Activity

  1. added
    GL JS parity
    on Jul 5, 2015
  2. 1ec5 commented on Jul 5, 2015

    @1ec5
    Contributor

    cc @jfirebaugh, who was looking at ways to implement this at the mbgl level.

  3. jfirebaugh commented on Jul 6, 2015

    @jfirebaugh
    Contributor

    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:

    struct CameraOptions {
        optional<LatLng> center;
        optional<float> zoom;
        optional<float> bearing;
        optional<float> pitch;
    };
    

    Related: #256.

  4. changed the title [-]mirror camera API[/-] [+]Implement camera API[/+] on Jul 10, 2015
  5. self-assigned this
    on Jul 28, 2015
  6. added a commit that references this issue on Jul 30, 2015
  7. 1ec5 commented on Jul 30, 2015

    @1ec5
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GL JS parityfeature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions