Skip to content

Commit e4d5e16

Browse files
committed
chore: remove pixel conversion comments
1 parent 1c1dd2a commit e4d5e16

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
733733
}
734734
val screenPointPx = mMap?.pixelForCoordinate(point)
735735
if (screenPointPx != null) {
736-
/** Android Mapbox SDK returns screen coordinates in physical pixels, while JS expects density-independent pixels. */
737736
val screenPointDp = toDp(screenPointPx)
738737
val event = MapClickEvent(_this, LatLng(point), screenPointDp, EventTypes.MAP_LONG_CLICK)
739738
mManager.handleEvent(event)
@@ -935,7 +934,6 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
935934
}
936935

937936
fun getCoordinateFromView(pointDp: ScreenCoordinate, response: CommandResponse) {
938-
/** Android Mapbox SDK expects screen coordinates expressed as physical pixels, while JS specifies them as density-independent pixels. */
939937
val pointPx = toPx(pointDp)
940938

941939
val coordinate = mMap!!.coordinateForPixel(pointPx)
@@ -946,7 +944,6 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
946944
}
947945

948946
fun getPointInView(coordinates: Point, response: CommandResponse) {
949-
/** Android Mapbox SDK returns screen coordinates in physical pixels, while JS expects density-independent pixels. */
950947
val pointDp = toDp(mMap!!.pixelForCoordinate(coordinates))
951948

952949
response.success {
@@ -963,7 +960,6 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
963960
return
964961
}
965962

966-
/** Android Mapbox SDK expects screen coordinates expressed as physical pixels, while JS specifies them as density-independent pixels. */
967963
val pointPx = toPx(pointDp)
968964
val queryGeometry = RenderedQueryGeometry(pointPx)
969965
val layers = layerIDs?.takeUnless { it.isEmpty() } ?: null
@@ -986,7 +982,6 @@ open class RNMBXMapView(private val mContext: Context, var mManager: RNMBXMapVie
986982
fun queryRenderedFeaturesInRect(rectDp: ScreenBox?, filter: Expression?, layerIDs: List<String>?, response: CommandResponse) {
987983
val size = mMap.getMapOptions().size
988984

989-
/** Android Mapbox SDK expects screen coordinates expressed as physical pixels, while JS specifies them as density-independent pixels. */
990985
val rectPx: ScreenBox =
991986
rectDp?.let { toPx(it) }
992987
?: ScreenBox(

0 commit comments

Comments
 (0)