@maplibre/maplibre-react-native 11.0.0-alpha.24 → 11.0.0-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,8 +20,6 @@ import com.facebook.react.bridge.ReadableArray
|
|
|
20
20
|
import com.facebook.react.bridge.ReadableMap
|
|
21
21
|
import com.facebook.react.bridge.WritableArray
|
|
22
22
|
import com.facebook.react.bridge.WritableMap
|
|
23
|
-
import com.facebook.react.bridge.WritableNativeArray
|
|
24
|
-
import com.facebook.react.bridge.WritableNativeMap
|
|
25
23
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
26
24
|
import com.facebook.react.uimanager.events.EventDispatcher
|
|
27
25
|
import org.json.JSONException
|
|
@@ -432,7 +430,7 @@ open class MLRNMapView(
|
|
|
432
430
|
|
|
433
431
|
override fun onMove(detector: MoveGestureDetector) {
|
|
434
432
|
cameraChangeTracker.setReason(CameraChangeTracker.USER_GESTURE)
|
|
435
|
-
handleMapChangedEvent("onRegionIsChanging")
|
|
433
|
+
handleMapChangedEvent("onRegionIsChanging", true)
|
|
436
434
|
}
|
|
437
435
|
|
|
438
436
|
override fun onMoveEnd(detector: MoveGestureDetector) {
|
|
@@ -636,7 +634,7 @@ open class MLRNMapView(
|
|
|
636
634
|
}
|
|
637
635
|
|
|
638
636
|
override fun onCameraIsChanging() {
|
|
639
|
-
handleMapChangedEvent("onRegionIsChanging")
|
|
637
|
+
handleMapChangedEvent("onRegionIsChanging", true)
|
|
640
638
|
}
|
|
641
639
|
|
|
642
640
|
override fun onWillStartLoadingMap() {
|
|
@@ -739,7 +737,7 @@ open class MLRNMapView(
|
|
|
739
737
|
|
|
740
738
|
fun setReactContentInset(value: ReadableMap?) {
|
|
741
739
|
if (value != null) {
|
|
742
|
-
val arr =
|
|
740
|
+
val arr = Arguments.createArray()
|
|
743
741
|
arr.pushDouble(if (value.hasKey("top")) value.getDouble("top") else 0.0)
|
|
744
742
|
arr.pushDouble(if (value.hasKey("right")) value.getDouble("right") else 0.0)
|
|
745
743
|
arr.pushDouble(if (value.hasKey("bottom")) value.getDouble("bottom") else 0.0)
|
|
@@ -1189,14 +1187,16 @@ open class MLRNMapView(
|
|
|
1189
1187
|
|
|
1190
1188
|
private fun makeViewState(isAnimated: Boolean?): WritableMap {
|
|
1191
1189
|
val position = mapLibreMap!!.cameraPosition
|
|
1192
|
-
val viewState: WritableMap =
|
|
1190
|
+
val viewState: WritableMap = Arguments.createMap()
|
|
1193
1191
|
|
|
1194
1192
|
if (position.target == null) {
|
|
1195
1193
|
return viewState
|
|
1196
1194
|
}
|
|
1197
1195
|
|
|
1198
|
-
viewState.
|
|
1199
|
-
|
|
1196
|
+
viewState.putArray("center", Arguments.createArray().apply {
|
|
1197
|
+
pushDouble(position.target!!.longitude)
|
|
1198
|
+
pushDouble(position.target!!.latitude)
|
|
1199
|
+
})
|
|
1200
1200
|
|
|
1201
1201
|
viewState.putDouble("zoom", position.zoom)
|
|
1202
1202
|
viewState.putDouble("bearing", position.bearing)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplibre/maplibre-react-native",
|
|
3
3
|
"description": "React Native library for creating maps with MapLibre Native for Android & iOS",
|
|
4
|
-
"version": "11.0.0-alpha.
|
|
4
|
+
"version": "11.0.0-alpha.25",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": true
|