[android] #2805 - Basic wiring up of Android Tilt methods to Core GL Pitch methods
This commit is contained in:
@@ -1102,6 +1102,25 @@ public final class MapView extends FrameLayout {
|
||||
this.mScrollEnabled = scrollEnabled;
|
||||
}
|
||||
|
||||
//
|
||||
// Pitch / Tilt
|
||||
//
|
||||
|
||||
/**
|
||||
* Gets the current Tilt in degrees of the MapView
|
||||
* @return tilt in degrees
|
||||
*/
|
||||
public double getTilt() {
|
||||
return mNativeMapView.getPitch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Tilt in degrees of the MapView
|
||||
* @param pitch New tilt in degrees
|
||||
*/
|
||||
public void setTilt(double pitch) {
|
||||
mNativeMapView.setPitch(pitch);
|
||||
}
|
||||
|
||||
//
|
||||
// Mirrored Google Map's Camera API
|
||||
@@ -1120,8 +1139,7 @@ public final class MapView extends FrameLayout {
|
||||
|
||||
setBearing(update.getBearing());
|
||||
|
||||
// TODO - Set tilt
|
||||
|
||||
setTilt(update.getTilt());
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -256,6 +256,14 @@ final class NativeMapView {
|
||||
nativeResetPosition(mNativeMapViewPtr);
|
||||
}
|
||||
|
||||
public double getPitch() {
|
||||
return nativeGetPitch(mNativeMapViewPtr);
|
||||
}
|
||||
|
||||
public void setPitch(double pitch) {
|
||||
nativeSetPitch(mNativeMapViewPtr, pitch);
|
||||
}
|
||||
|
||||
public void scaleBy(double ds) {
|
||||
scaleBy(ds, -1.0, -1.0);
|
||||
}
|
||||
@@ -533,6 +541,10 @@ final class NativeMapView {
|
||||
|
||||
private native void nativeResetPosition(long nativeMapViewPtr);
|
||||
|
||||
private native double nativeGetPitch(long nativeMapViewPtr);
|
||||
|
||||
private native void nativeSetPitch(long nativeMapViewPtr, double pitch);
|
||||
|
||||
private native void nativeScaleBy(long nativeMapViewPtr, double ds,
|
||||
double cx, double cy, long duration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user