summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-10-27 00:02:46 +1100
committerLeith Bade <leith@mapbox.com>2015-10-27 08:52:45 +1100
commit5f081701dff785090827b8a4891aa27f2bae57c6 (patch)
treefd1f255ecc73a4206e640f756990860dfa98b25b /android
parent1f21bbc0eb4729c00a9576ebfbeb116cf3e9c88c (diff)
downloadqtlocation-mapboxgl-5f081701dff785090827b8a4891aa27f2bae57c6.tar.gz
[android] Improve Javadoc for the new MapView methods.
Diffstat (limited to 'android')
-rw-r--r--android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java14
-rw-r--r--android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java32
2 files changed, 25 insertions, 21 deletions
diff --git a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java
index 1616a62352..6cfc48c0e1 100644
--- a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java
+++ b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MyLocationTracking.java
@@ -8,7 +8,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
- * MyLocationTracking exposes different types location tracking modes.
+ * MyLocationTracking exposes different types of location tracking modes.
*
* @see MapView#setMyLocationTrackingMode(int)
* @see com.mapbox.mapboxsdk.views.UserLocationView#setMyLocationTrackingMode(int)
@@ -24,27 +24,29 @@ public class MyLocationTracking {
}
/**
- * Not tracking user
+ * Location tracking is disabled.
*/
public static final int TRACKING_NONE = 0x00000000;
/**
- * Tracking the location of the user
+ * Tracking the only the location of the user.
*/
public static final int TRACKING_FOLLOW = 0x00000004;
// /**
-// * Tracking the location of the user with bearing from GPS
+// * Tracking the location of the user with bearing from GPS.
// */
// public static final int TRACKING_FOLLOW_BEARING_GPS = 0x00000008;
//
// /**
-// * Tracking the location of the user with bearing from compass
+// * Tracking the location of the user with bearing from compass.
// */
// public static final int TRACKING_FOLLOW_BEARING_COMPASS = 0x00000012;
//
// /**
-// * Tracking the location fot the user with bearing from GPS and compass
+// * Tracking the location fot the user with bearing from GPS or compass.
+// * <p>
+// * The best source of bearing is selected automatically.
// */
// public static final int TRACKING_FOLLOW_BEARING = 0x00000016;
diff --git a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
index 22492e25c7..6f59ea211f 100644
--- a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
+++ b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/views/MapView.java
@@ -1366,6 +1366,7 @@ public final class MapView extends FrameLayout {
* An error message will be logged in the Android logcat and {@link MapView#DID_FAIL_LOADING_MAP} event will be sent.
*
* @param style The bundled style. Accepts one of the values from {@link Style}.
+ * @see Style
*/
@UiThread
public void setStyle(@Style.StyleUrl String style) {
@@ -2017,8 +2018,8 @@ public final class MapView extends FrameLayout {
}
/**
- * Changes the map’s viewport to fit the given coordinate bounds, optionally some additional padding on each side
- * and animating the change.
+ * Changes the map’s viewport to fit the given coordinate bounds with additional padding at the
+ * edge of the map, optionally animating the change.
*
* @param bounds The bounds that the viewport will show in its entirety.
* @param padding The minimum padding (in pixels) that will be visible around the given coordinate bounds.
@@ -3137,34 +3138,35 @@ public final class MapView extends FrameLayout {
}
/**
- * Set the current my location tracking mode.
- * Tracking my location disbales gestures, automatically moves the viewport
- * and shows the direction the user is heading.
- * See {@link MyLocationTracking} for different values.
+ * Sets the current my location tracking mode.
+ * <p>
+ * My location racking disables gestures, automatically moves the viewport to the users
+ * location and shows the direction the user is heading.
*
- * @param userLocationTrackingMode to be used.
- * @see MyLocationTracking
+ * @param myLocationTrackingMode The my location tracking mode to use.
+ * Accepts one of the values from {@link MyLocationTracking.Mode}.
+ * @see MyLocationTracking.Mode
*/
@UiThread
- public void setMyLocationTrackingMode(@MyLocationTracking.Mode int userLocationTrackingMode) {
- mUserLocationView.setMyLocationTrackingMode(userLocationTrackingMode);
+ public void setMyLocationTrackingMode(@MyLocationTracking.Mode int myLocationTrackingMode) {
+ mUserLocationView.setMyLocationTrackingMode(myLocationTrackingMode);
// Enable/disable gestures based on tracking mode
- if (userLocationTrackingMode == MyLocationTracking.TRACKING_NONE) {
+ if (myLocationTrackingMode == MyLocationTracking.TRACKING_NONE) {
mScrollEnabled = true;
mRotateEnabled = true;
} else {
mScrollEnabled = false;
- mRotateEnabled = (userLocationTrackingMode == MyLocationTracking.TRACKING_FOLLOW);
+ mRotateEnabled = (myLocationTrackingMode == MyLocationTracking.TRACKING_FOLLOW);
}
}
/**
* Returns the current user location tracking mode.
- * See {@link MyLocationTracking} for possible return values.
*
- * @return the current user location tracking mode.
- * @see MyLocationTracking
+ * @return The current user location tracking mode.
+ * One of the values from {@link MyLocationTracking.Mode}.
+ * @see MyLocationTracking.Mode
*/
@UiThread
@MyLocationTracking.Mode