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.
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.
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.CameraPositioncameraPosition = newCameraPosition.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 buildermap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
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.
Activity
ljbade commentedon Oct 26, 2015
@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.
1ec5 commentedon Oct 26, 2015
Now that #2770 is merged, the biggest known issues are #2266, #2259, and possibly #2139. #256 is unimplemented.
bleege commentedon Nov 30, 2015
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, andMapView.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) isMapView.animateCamera(CameraUpdate cu)as it deals with zoom, center location, etc./cc @zugaldia @tobrun @1ec5
1ec5 commentedon Nov 30, 2015
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.
[android] #2805 - Initial CameraPosition API
[android] #2805 - Implementing Parcelable and adding Builder
28 remaining items
[android] #2805 - Setting TiltActivity to test setPitch() directly. A…
[android] #2805 - Placeholder for a ShoveGestureListener
[android] #2805 - public API to enable or disable tilt
[android] #2805 - add mShoveGestureDetector to the event chain
[android] #2805 - Updating Tilt API to support animation duration time
[android] #2805 - basic tilt gesture working with ShoveGestureListener
[android] #2805 - Integrating gesture with new get / set Tilt API ref…
[android] #2805 - Removing Camera API for now
[android] #2805 - scale and clamp values for pitch
[android] #2805 - Using MINIMUM_TILT and MAXIMUM_TILT constants for a…
bleege commentedon Dec 3, 2015
Rebase, Merge, Done.
zugaldia commentedon Dec 3, 2015
Bravo.
[-]Android Camera API (aka Tilt)[/-][+]Tilt On Android[/+]