diff --git a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java index 7e0d65963..894ed4259 100644 --- a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java +++ b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java @@ -17,6 +17,7 @@ import com.mapbox.android.gestures.AndroidGesturesManager; import com.mapbox.mapboxsdk.R; +import com.mapbox.mapboxsdk.maps.MapboxMap; import com.mapbox.mapboxsdk.style.layers.Layer; import java.util.Arrays; @@ -1729,8 +1730,12 @@ public LocationComponentOptions.Builder staleStateTimeout(long timeout) { *

* * @param padding The margins for the map in pixels (left, top, right, bottom). - * @deprecated Use {@link CameraPosition.Builder#padding(double, double, double, double)} - * or {@link CameraUpdateFactory#paddingTo(double, double, double, double)} instead. + * @deprecated Use + * {@link com.mapbox.mapboxsdk.camera.CameraPosition.Builder#padding(double, double, double, double)} + * or {@link com.mapbox.mapboxsdk.camera.CameraUpdateFactory#paddingTo(double, double, double, double)} + * when not tracking and + * {@link LocationComponent#paddingWhileTracking(double[], long, MapboxMap.CancelableCallback)} + * when {@link com.mapbox.mapboxsdk.location.modes.CameraMode} tracking is engaged to manipulate the padding. */ @NonNull @Deprecated diff --git a/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationModesActivity.java b/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationModesActivity.java index e35bd6315..502cc249f 100644 --- a/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationModesActivity.java +++ b/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationModesActivity.java @@ -207,10 +207,10 @@ public void onFinish() { } else if (id == R.id.action_component_padding_animation_while_tracking) { Random paddingRandom = new Random(); locationComponent.paddingWhileTracking(new double[] { - paddingRandom.nextDouble() * 500, - paddingRandom.nextDouble() * 500, - paddingRandom.nextDouble() * 500, - paddingRandom.nextDouble() * 500 + paddingRandom.nextDouble() * 500 * (paddingRandom.nextBoolean() ? -1: 1), + paddingRandom.nextDouble() * 500 * (paddingRandom.nextBoolean() ? -1: 1), + paddingRandom.nextDouble() * 500 * (paddingRandom.nextBoolean() ? -1: 1), + paddingRandom.nextDouble() * 500 * (paddingRandom.nextBoolean() ? -1: 1) }, 1000L, new MapboxMap.CancelableCallback() { @Override public void onCancel() {