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

Android Tilt Implementation #3158

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
36eb07a
[android] #2805 - Initial CameraPosition API
bleege Nov 30, 2015
339f806
[android] #2805 - Implementing Parcelable and adding Builder
bleege Dec 1, 2015
645e9ee
[android] #2805 - add sample tilt activity to test app
zugaldia Dec 1, 2015
d289f23
[android] #2805 - Adding Toolbar to TiltActivity for consistent navig…
bleege Dec 2, 2015
48f8bbf
[android] #2805 - CameraUpdate and animateCamera() API
bleege Dec 2, 2015
556ea6f
[android] #2805 - Adding processing of target, zoom, and bearing in a…
bleege Dec 2, 2015
b23caa7
[android] #2805 - Basic wiring up of Android Tilt methods to Core GL …
bleege Dec 3, 2015
f22c5f1
[android] #2805 - Create a target to keep both location values consis…
zugaldia Dec 3, 2015
4567d7d
[android] #2805 - Setting TiltActivity to test setPitch() directly. …
bleege Dec 3, 2015
3ce3656
[android] #2805 - Placeholder for a ShoveGestureListener
zugaldia Dec 3, 2015
038318c
[android] #2805 - public API to enable or disable tilt
zugaldia Dec 3, 2015
bd5bb94
[android] #2805 - add mShoveGestureDetector to the event chain
zugaldia Dec 3, 2015
57705ac
[android] #2805 - Updating Tilt API to support animation duration time
bleege Dec 3, 2015
56a4f57
[android] #2805 - basic tilt gesture working with ShoveGestureListener
zugaldia Dec 3, 2015
17cdc1c
Merge remote-tracking branch 'origin/2805-android-tilt' into 2805-and…
bleege Dec 3, 2015
9f8acf5
[android] #2805 - Integrating gesture with new get / set Tilt API ref…
bleege Dec 3, 2015
eede504
[android] #2805 - Removing Camera API for now
bleege Dec 3, 2015
ddf3a4b
[android] #2805 - scale and clamp values for pitch
zugaldia Dec 3, 2015
b20f5db
[android] #2805 - scale and clamp values for pitch
zugaldia Dec 3, 2015
4ac5f3d
[android] #2805 - Using MINIMUM_TILT and MAXIMUM_TILT constants for a…
bleege Dec 3, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[android] #2805 - Adding processing of target, zoom, and bearing in a…
…nimateCamera. Setting default location of TiltActivity to DC for more obvious change.
  • Loading branch information
bleege committed Dec 2, 2015
commit 556ea6ffcbab6b20ee78a2f63b3fcb35697557df
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,20 @@ public final class CameraUpdate {
this.tilt = tilt;
this.zoom = zoom;
}

public float getBearing() {
return bearing;
}

public LatLng getTarget() {
return target;
}

public float getTilt() {
return tilt;
}

public float getZoom() {
return zoom;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,13 @@ public void setScrollEnabled(boolean scrollEnabled) {
@UiThread
public final void animateCamera (CameraUpdate update) {

LatLngZoom llz = new LatLngZoom(update.getTarget(), update.getZoom());
setCenterCoordinate(llz);

setBearing(update.getBearing());

// TODO - Set tilt

}

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ protected void onCreate(Bundle savedInstanceState) {
}

// Target
LatLng dc = new LatLng(38.90252, -77.02291);
LatLng nyc = new LatLng(40.73581, -73.99155);

// Set up the map
mMapView = (MapView) findViewById(R.id.tiltMapView);
mMapView.setAccessToken(ApiAccess.getToken(this));
mMapView.setStyleUrl(Style.MAPBOX_STREETS);
mMapView.setCenterCoordinate(nyc);
mMapView.setCenterCoordinate(dc);
mMapView.setZoomLevel(11);
mMapView.onCreate(savedInstanceState);

Expand Down