[android] #2805 - Setting TiltActivity to test setPitch() directly. Adding FloatRange annotations to setTilt() and tilt() methods.
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mapbox.mapboxsdk.camera;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.FloatRange;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
|
||||
public final class CameraPosition implements Parcelable {
|
||||
@@ -146,6 +147,7 @@ public final class CameraPosition implements Parcelable {
|
||||
* @param tilt Tilt value
|
||||
* @return Builder
|
||||
*/
|
||||
@FloatRange(from = 0.0, to = 60.0)
|
||||
public Builder tilt(float tilt) {
|
||||
this.tilt = tilt;
|
||||
return this;
|
||||
|
||||
@@ -1118,6 +1118,7 @@ public final class MapView extends FrameLayout {
|
||||
* Sets the Tilt in degrees of the MapView
|
||||
* @param pitch New tilt in degrees
|
||||
*/
|
||||
@FloatRange(from = 0.0, to = 60.0)
|
||||
public void setTilt(double pitch) {
|
||||
mNativeMapView.setPitch(pitch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user