summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/res/values
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/res/values')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml46
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml3
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml3
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml45
4 files changed, 97 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml
index 053da80ade..9206899dd6 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml
@@ -128,4 +128,50 @@
<enum name="bottom" value="3"/>
</attr>
</declare-styleable>
+
+ <declare-styleable name="mapbox_LocationLayer">
+ <attr name="mapbox_foregroundDrawable" format="reference"/>
+ <attr name="mapbox_foregroundTintColor" format="color"/>
+ <attr name="mapbox_backgroundDrawable" format="reference"/>
+ <attr name="mapbox_backgroundTintColor" format="color"/>
+ <attr name="mapbox_bearingDrawable" format="reference"/>
+ <attr name="mapbox_bearingTintColor" format="color"/>
+ <attr name="mapbox_gpsDrawable" format="reference"/>
+
+ <attr name="mapbox_foregroundDrawableStale" format="reference"/>
+ <attr name="mapbox_foregroundStaleTintColor" format="color"/>
+ <attr name="mapbox_backgroundDrawableStale" format="reference"/>
+ <attr name="mapbox_backgroundStaleTintColor" format="color"/>
+
+ <attr name="mapbox_accuracyAlpha" format="float"/>
+ <attr name="mapbox_accuracyColor" format="color"/>
+
+ <attr name="mapbox_elevation" format="dimension"/>
+
+ <!-- Stale state -->
+ <attr name="mapbox_enableStaleState" format="boolean"/>
+ <attr name="mapbox_staleStateTimeout" format="integer" min="0"/>
+
+ <!-- Location icon padding -->
+ <attr name="mapbox_iconPaddingLeft" format="integer"/>
+ <attr name="mapbox_iconPaddingTop" format="integer"/>
+ <attr name="mapbox_iconPaddingRight" format="integer"/>
+ <attr name="mapbox_iconPaddingBottom" format="integer"/>
+
+ <!-- Map layer configuration -->
+ <attr name="mapbox_layer_below" format="string"/>
+
+ <!-- Map zoom levels -->
+ <attr name="mapbox_maxZoom" format="float"/>
+ <attr name="mapbox_minZoom" format="float"/>
+
+ <!-- Icon scale based on map zoom levels -->
+ <attr name="mapbox_maxZoomIconScale" format="float"/>
+ <attr name="mapbox_minZoomIconScale" format="float"/>
+
+ <!-- Camera tracking settings -->
+ <attr name="mapbox_trackingInitialMoveThreshold" format="dimension"/>
+ <attr name="mapbox_trackingMultiFingerMoveThreshold" format="dimension"/>
+
+ </declare-styleable>
</resources>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
index 19007f503f..565d1c99ca 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml
@@ -3,4 +3,7 @@
<color name="mapbox_gray_dark">#5F5F5F</color>
<color name="mapbox_gray">#7D7F80</color>
<color name="mapbox_blue">#1E8CAB</color>
+
+ <color name="mapbox_location_layer_blue">#4A90E2</color>
+ <color name="mapbox_location_layer_gray">#A1B0C0</color>
</resources>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
index 00fc05cf6d..9bf77d46d9 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml
@@ -15,4 +15,7 @@
<!--Minimum angular velocity required to start rotation animation-->
<dimen name="mapbox_minimum_angular_velocity">0.025dp</dimen>
+
+ <dimen name="mapbox_locationLayerTrackingInitialMoveThreshold">25dp</dimen>
+ <dimen name="mapbox_locationLayerTrackingMultiFingerMoveThreshold">125dp</dimen>
</resources>
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml
new file mode 100644
index 0000000000..40bf1540ab
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/styles.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="mapbox_LocationLayer">
+ <item name="mapbox_foregroundDrawable">@drawable/mapbox_user_icon</item>
+ <item name="mapbox_backgroundDrawable">@drawable/mapbox_user_stroke_icon</item>
+ <item name="mapbox_bearingDrawable">@drawable/mapbox_user_bearing_icon</item>
+ <item name="mapbox_gpsDrawable">@drawable/mapbox_user_puck_icon</item>
+
+ <item name="mapbox_foregroundDrawableStale">@drawable/mapbox_user_icon_stale</item>
+ <item name="mapbox_backgroundDrawableStale">@drawable/mapbox_user_stroke_icon</item>
+
+ <item name="mapbox_accuracyAlpha">0.15</item>
+ <item name="mapbox_accuracyColor">@color/mapbox_location_layer_blue</item>
+
+ <item name="mapbox_elevation">12dp</item>
+
+ <item name="mapbox_enableStaleState">true</item>
+ <item name="mapbox_staleStateTimeout">30000</item>
+
+
+ <!-- Location icon padding -->
+ <item name="mapbox_iconPaddingLeft">0</item>
+ <item name="mapbox_iconPaddingTop">0</item>
+ <item name="mapbox_iconPaddingRight">0</item>
+ <item name="mapbox_iconPaddingBottom">0</item>
+
+ <!-- Map zoom levels -->
+ <item name="mapbox_maxZoom">18</item>
+ <item name="mapbox_minZoom">2</item>
+
+ <!-- Location icon scale based on map zoom levels -->
+ <item name="mapbox_maxZoomIconScale">1</item>
+ <item name="mapbox_minZoomIconScale">0.6</item>
+
+ <!-- Camera tracking settings -->
+ <item name="mapbox_trackingInitialMoveThreshold">
+ @dimen/mapbox_locationLayerTrackingInitialMoveThreshold
+ </item>
+ <item name="mapbox_trackingMultiFingerMoveThreshold">
+ @dimen/mapbox_locationLayerTrackingMultiFingerMoveThreshold
+ </item>
+
+ </style>
+</resources> \ No newline at end of file