[android] #2805 - Setting TiltActivity to test setPitch() directly. Adding FloatRange annotations to setTilt() and tilt() methods.

This commit is contained in:
Brad Leege
2015-12-03 13:27:04 -06:00
parent 5024d45c63
commit 4dd84b3d92
3 changed files with 13 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);
}