summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-10-31 10:03:15 +0100
committerTobrun <tobrun@mapbox.com>2018-10-31 14:53:56 +0100
commit278aa3370374154ad6fac7790d2da1546e8493f3 (patch)
treea25bf26d8ccaa2950962d0bf47d544409d2b4349
parentcfe21330d67c0336d518ffa29dd1d534e062ac5b (diff)
downloadqtlocation-mapboxgl-278aa3370374154ad6fac7790d2da1546e8493f3.tar.gz
[android] - optimise imports, fixup small nitpicks
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java20
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java26
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java5
4 files changed, 11 insertions, 42 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java
index 7a17e500ca..67385fdba4 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/GeometryConstants.java
@@ -2,72 +2,52 @@ package com.mapbox.mapboxsdk.constants;
/**
* Contains constants used throughout the sdk classes.
- *
- * @since 6.0.0
*/
public class GeometryConstants {
/**
* The <a href='http://en.wikipedia.org/wiki/Earth_radius#Equatorial_radius'>equatorial radius</a>
* value in meters
- *
- * @since 6.0.0
*/
public static final int RADIUS_EARTH_METERS = 6378137;
/**
* This constant represents the lowest longitude value available to represent a geolocation.
- *
- * @since 6.0.0
*/
public static final double MIN_LONGITUDE = -180;
/**
* This constant represents the highest longitude value available to represent a geolocation.
- *
- * @since 6.0.0
*/
public static final double MAX_LONGITUDE = 180;
/**
* This constant represents the lowest latitude value available to represent a geolocation.
- *
- * @since 6.0.0
*/
public static final double MIN_LATITUDE = -90;
/**
* This constant represents the latitude span when representing a geolocation.
- *
- * @since 6.0.0
*/
public static final double LATITUDE_SPAN = 180;
/**
* This constant represents the longitude span when representing a geolocation.
- *
- * @since 6.0.0
*/
public static final double LONGITUDE_SPAN = 360;
/**
* This constant represents the highest latitude value available to represent a geolocation.
- *
- * @since 6.0.0
*/
public static final double MAX_LATITUDE = 90;
/**
* Maximum latitude value in Mercator projection.
- *
- * @since 6.0.0
*/
public static final double MAX_MERCATOR_LATITUDE = 85.05112877980659;
/**
* Minimum latitude value in Mercator projection.
- *
- * @since 6.0.0
*/
public static final double MIN_MERCATOR_LATITUDE = -85.05112877980659;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
index 10dfff8694..a3f8af34b2 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponentOptions.java
@@ -717,7 +717,6 @@ public class LocationComponentOptions implements Parcelable {
* Get the tracking animation duration multiplier.
*
* @return tracking animation duration multiplier
- * @since 0.9.0
*/
public float trackingAnimationDurationMultiplier() {
return trackingAnimationDurationMultiplier;
@@ -1548,7 +1547,6 @@ public class LocationComponentOptions implements Parcelable {
* Sets the tracking animation duration multiplier.
*
* @param trackingAnimationDurationMultiplier the tracking animation duration multiplier
- * @since 0.9.0
*/
public LocationComponentOptions.Builder trackingAnimationDurationMultiplier(
float trackingAnimationDurationMultiplier) {
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index 7411ace6a4..8649af7f2e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -6,22 +6,21 @@ import android.graphics.PointF;
import android.graphics.drawable.ColorDrawable;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
-import android.support.annotation.CallSuper;
-import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
+import android.support.annotation.Nullable;
+import android.support.annotation.IntDef;
+import android.support.annotation.CallSuper;
import android.support.v4.util.LongSparseArray;
import android.util.AttributeSet;
-import android.view.KeyEvent;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
import android.widget.FrameLayout;
import android.widget.ImageView;
-
import com.mapbox.android.gestures.AndroidGesturesManager;
import com.mapbox.mapboxsdk.MapStrictMode;
import com.mapbox.mapboxsdk.Mapbox;
@@ -38,12 +37,12 @@ import com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer
import com.mapbox.mapboxsdk.maps.renderer.textureview.TextureViewMapRenderer;
import com.mapbox.mapboxsdk.maps.widgets.CompassView;
import com.mapbox.mapboxsdk.net.ConnectivityReceiver;
-import com.mapbox.mapboxsdk.offline.OfflineGeometryRegionDefinition;
import com.mapbox.mapboxsdk.offline.OfflineRegionDefinition;
-import com.mapbox.mapboxsdk.offline.OfflineTilePyramidRegionDefinition;
import com.mapbox.mapboxsdk.storage.FileSource;
import com.mapbox.mapboxsdk.utils.BitmapUtils;
+import javax.microedition.khronos.egl.EGLConfig;
+import javax.microedition.khronos.opengles.GL10;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -51,9 +50,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import javax.microedition.khronos.egl.EGLConfig;
-import javax.microedition.khronos.opengles.GL10;
-
import static com.mapbox.mapboxsdk.maps.widgets.CompassView.TIME_MAP_NORTH_ANIMATION;
import static com.mapbox.mapboxsdk.maps.widgets.CompassView.TIME_WAIT_IDLE;
@@ -537,11 +533,11 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
mapboxMapOptions.camera(cameraPosition);
mapboxMapOptions.minZoomPreference(minZoom);
mapboxMapOptions.maxZoomPreference(maxZoom);
- return;
+ } else {
+ mapboxMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
+ mapboxMap.setMinZoomPreference(minZoom);
+ mapboxMap.setMaxZoomPreference(maxZoom);
}
- mapboxMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
- mapboxMap.setMinZoomPreference(minZoom);
- mapboxMap.setMaxZoomPreference(maxZoom);
}
//
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java
index 2631f74ccf..473d905f1a 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java
@@ -23,7 +23,6 @@ public interface OfflineRegionDefinition {
* Returns the map style url of the OfflineRegion.
*
* @return The URL of the map style.
- * @since 7.0.0
*/
String getStyleURL();
@@ -31,7 +30,6 @@ public interface OfflineRegionDefinition {
* Gets the minimum zoom level the OfflineRegion map can be displayed at.
*
* @return The minimum zoom level.
- * @since 7.0.0
*/
double getMinZoom();
@@ -39,7 +37,6 @@ public interface OfflineRegionDefinition {
* Gets the maximum zoom level the OfflineRegion map can be displayed at.
*
* @return The maximum zoom level.
- * @since 7.0.0
*/
double getMaxZoom();
@@ -47,7 +44,6 @@ public interface OfflineRegionDefinition {
* Gets the pixel ratio of the OfflineRegion map.
*
* @return The pixel ratio of the OfflineRegion map.
- * @since 7.0.0
*/
float getPixelRatio();
@@ -55,7 +51,6 @@ public interface OfflineRegionDefinition {
* Gest the type of the OfflineRegionDefinition for telemetry ("tileregion", "shaperegion").
*
* @return The type of the OfflineRegionDefinition.
- * @since 7.0.0
*/
String getType();