You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocation.kt
+35-12Lines changed: 35 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,22 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
55
55
56
56
// region bearing
57
57
var androidRenderMode:RenderMode?=null
58
+
set(value) {
59
+
field = value
60
+
_apply()
61
+
}
62
+
58
63
var puckBearing:PuckBearing?=null
64
+
set(value) {
65
+
field = value
66
+
_apply()
67
+
}
68
+
59
69
var puckBearingEnabled:Boolean?=null
70
+
set(value) {
71
+
field = value
72
+
_apply()
73
+
}
60
74
// endregion
61
75
62
76
enumclassPuckImagePart {
@@ -125,36 +139,45 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
125
139
126
140
privatefun_apply(mapView:MapView) {
127
141
val location2 = mapView.location2;
128
-
129
-
val withBearing = puckBearingEnabled ?:when (androidRenderMode ?:RenderMode.NORMAL) {
130
-
RenderMode.GPS->true
131
-
RenderMode.COMPASS->true
132
-
RenderMode.NORMAL->false
142
+
// Log a warning if both puckBearingEnabled and androidRenderMode are provided
143
+
if (puckBearingEnabled !=null&& androidRenderMode !=null) {
144
+
Logger.w(LOG_TAG, "Both `puckBearingEnabled` and `androidRenderMode` are provided. `androidRenderMode` takes precedence, and `puckBearingEnabled` will be ignored.")
0 commit comments