summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2018-09-04 12:51:38 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-09-12 13:59:11 +0200
commitbfe0b67572e877dbc55f27dfcfee7c75b953fc8a (patch)
tree4ffc55176be32d7c2f7953e33dc222c0afa2a2fa /platform/android/MapboxGLAndroidSDK/src
parent465316b4cef4b0d4630d855a789f5b6acef2084e (diff)
downloadqtlocation-mapboxgl-bfe0b67572e877dbc55f27dfcfee7c75b953fc8a.tar.gz
[android] LocationLayer example activities
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerPlugin.java28
1 files changed, 16 insertions, 12 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerPlugin.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerPlugin.java
index 45a13ed58b..021729b6ba 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerPlugin.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerPlugin.java
@@ -143,7 +143,7 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
* <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
+ * <strong>Note</strong>: This method will initialize and use an internal {@link LocationEngine}.
*
* @param context the context
*/
@@ -155,10 +155,10 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
- * <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
*
- * @param context the context
+ * @param context the context
+ * @param useDefaultLocationEngine true if you want to initialize and use the built-in location engine or false if
+ * there should be no location engine initialized
*/
@RequiresPermission(anyOf = {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION})
public void activateLocationLayerPlugin(@NonNull Context context, boolean useDefaultLocationEngine) {
@@ -172,7 +172,7 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
* <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
+ * <strong>Note</strong>: This method will initialize and use an internal {@link LocationEngine}.
*
* @param context the context
* @param styleRes the LocationLayerPlugin style res
@@ -185,7 +185,7 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
* <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
+ * <strong>Note</strong>: This method will initialize and use an internal {@link LocationEngine}.
* </p>
*
* @param context the context
@@ -200,9 +200,6 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
- * <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
- * </p>
*
* @param context the context
* @param locationEngine the engine, or null if you'd like to only force location updates
@@ -215,9 +212,16 @@ public final class LocationLayerPlugin {
/**
* This method will show the location icon and enable the camera tracking the location.
- * <p>
- * <strong>Note</strong>: This constructor will initialize and use an internal {@link LocationEngine}.
- * </p>
+ *
+ * @param context the context
+ * @param locationEngine the engine
+ */
+ public void activateLocationLayerPlugin(@NonNull Context context, @NonNull LocationEngine locationEngine) {
+ activateLocationLayerPlugin(context, locationEngine, R.style.mapbox_LocationLayer);
+ }
+
+ /**
+ * This method will show the location icon and enable the camera tracking the location.
*
* @param locationEngine the engine, or null if you'd like to only force location updates
* @param options the options