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.

Tilt On Android #2805

Closed
Closed

Description

@bleege

The Core GL work to support perspective was done by @ansis at the end of August. @1ec5 added iOS bindings for it #2159 and #2193. Now that the initial version of the Android SDK (v 2.1.0) has been released (as of 21-Oct-2015) we should add support in Android.

/cc @mapbox/mobile @twbell

Activity

  1. added
    Android
    on Oct 26, 2015
  2. added this to the android-v2.2.0 milestone on Oct 26, 2015
  3. ljbade commented on Oct 26, 2015

    @ljbade
    Contributor

    @1ec5 From my reading of relevant tickets, there are still a few bugs and functions that don't take into account tilt?

    Just want to make sure we have a list of the ones that have not been fixed to include as known issues with tilt in the release notes.

  4. 1ec5 commented on Oct 26, 2015

    @1ec5
    Contributor

    Now that #2770 is merged, the biggest known issues are #2266, #2259, and possibly #2139. #256 is unimplemented.

  5. bleege commented on Nov 30, 2015

    @bleege
    ContributorAuthor

    Looking at the how iOS implemented tilt in https://github.com/mapbox/mapbox-gl-native/pull/2159/files and https://github.com/mapbox/mapbox-gl-native/pull/2193/files it appears that the Core GL has the necessary API for Android implementation. We should be able to wire this up with JNI and have what we need for the Android bindings API.

    The outstanding question is going to be how much will the Android bindings API look like the Google Maps for Android Camera API? Google Maps Android API uses. I think we can get by (for now) with simply implementing CameraPosition, CameraPosition.Builder, and MapView.animateCamera(CameraPosition cp) as their example (see below) does. The "extra" API that we don't need for now (as it'll change the Mapbox API) is MapView.animateCamera(CameraUpdate cu) as it deals with zoom, center location, etc.

    // Construct a CameraPosition focusing on Mountain View and animate the camera to that position.
    CameraPosition cameraPosition = new CameraPosition.Builder()
        .target(MOUNTAIN_VIEW)      // Sets the center of the map to Mountain View
        .zoom(17)                   // Sets the zoom
        .bearing(90)                // Sets the orientation of the camera to east
        .tilt(30)                   // Sets the tilt of the camera to 30 degrees
        .build();                   // Creates a CameraPosition from the builder
    map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));

    /cc @zugaldia @tobrun @1ec5

  6. 1ec5 commented on Nov 30, 2015

    @1ec5
    Contributor

    On iOS, we modeled MGLMapCamera after MKMapCamera, since the goal is to more or less match MapKit. The APIs there are intent-driven. You don’t need a lesson on zoom levels and viewing angles to come up with the right values; instead, you decide how high the viewpoint is and what it’s looking at. But if the Google Maps SDK provides literal access to zoom levels and tilt, I think it’d be perfectly reasonable (and more expedient) for the Mapbox Android SDK to do likewise.

  7. added 2 commits that reference this issue on Dec 1, 2015
  8. 28 remaining items

  9. added a commit that references this issue on Dec 3, 2015
  10. added 3 commits that reference this issue on Dec 3, 2015
  11. added a commit that references this issue on Dec 3, 2015
  12. added a commit that references this issue on Dec 3, 2015
  13. added 2 commits that reference this issue on Dec 3, 2015
  14. added a commit that references this issue on Dec 3, 2015
  15. added a commit that references this issue on Dec 3, 2015
  16. bleege commented on Dec 3, 2015

    @bleege
    ContributorAuthor

    Rebase, Merge, Done.

  17. zugaldia commented on Dec 3, 2015

    @zugaldia
    Member

    Bravo.

  18. changed the title [-]Android Camera API (aka Tilt)[/-] [+]Tilt On Android[/+] on Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Android

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions