summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2016-01-08 17:18:49 +0100
committerTobrun <tobrun@mapbox.com>2016-01-08 17:44:54 +0100
commit656eb8766c147f4429115b8431511d6213859684 (patch)
tree09f4c144a0b59e16917e0691ba576b5df2dbd9f6 /platform
parenta06f28ddb70cd1963076d6df2ef3716d45b7a13e (diff)
downloadqtlocation-mapboxgl-656eb8766c147f4429115b8431511d6213859684.tar.gz
[android] #3481 - add check to enable location in tracking mode
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
index 17627d304e..4d423405e2 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
@@ -178,7 +178,7 @@ public final class MapView extends FrameLayout {
/**
* The currently supported maximum and minimum tilt values.
*
- * @see MapView#setTilt(double)
+ * @see MapView#setTilt(Double, Long)
*/
private static final double MINIMUM_TILT = 0;
private static final double MAXIMUM_TILT = 60;
@@ -3933,7 +3933,8 @@ public final class MapView extends FrameLayout {
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION})
public void setMyLocationTrackingMode(@MyLocationTracking.Mode int myLocationTrackingMode) {
- if(!isMyLocationEnabled()){
+ if(myLocationTrackingMode!=MyLocationTracking.TRACKING_NONE && !isMyLocationEnabled()){
+ //noinspection ResourceType
setMyLocationEnabled(true);
}
@@ -3989,7 +3990,8 @@ public final class MapView extends FrameLayout {
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION})
public void setMyBearingTrackingMode(@MyBearingTracking.Mode int myBearingTrackingMode) {
- if(!isMyLocationEnabled()){
+ if(myBearingTrackingMode!=MyBearingTracking.NONE && !isMyLocationEnabled()){
+ //noinspection ResourceType
setMyLocationEnabled(true);
}