Skip to content

Commit cc2dfd3

Browse files
authored
fix(android): ignore camera padding for marker view (#3888)
* fix(android): ignore camera padding for marker view * fix(android): mapbox 10 build error (due to cameraIgnorePadding option)
1 parent c9221c8 commit cc2dfd3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXMarkerView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class RNMBXMarkerView(context: Context?, private val mManager: RNMBXMarkerViewMa
186186
allowOverlapWithPuck(mAllowOverlapWithPuck)
187187
offsets(offset.dx, offset.dy)
188188
selected(mIsSelected)
189-
189+
ignoreCameraPadding(true)
190190
}
191191
return options
192192
}

android/src/main/mapbox-v11-compat/v10/com/rnmapbox/rnmbx/v11compat/Annotation.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ fun ViewAnnotationOptions.Builder.height(value: Double): ViewAnnotationOptions.B
2121
return this.height(value.toInt())
2222
}
2323

24-
fun com.mapbox.maps.ViewAnnotationOptions.Builder.allowOverlapWithPuck(value: Boolean): ViewAnnotationOptions.Builder {
24+
fun ViewAnnotationOptions.Builder.allowOverlapWithPuck(value: Boolean): ViewAnnotationOptions.Builder {
25+
return this;
26+
}
27+
28+
fun ViewAnnotationOptions.Builder.ignoreCameraPadding(value: Boolean): ViewAnnotationOptions.Builder {
2529
return this;
2630
}
2731

0 commit comments

Comments
 (0)