@maplibre/maplibre-react-native 11.0.0-alpha.24 → 11.0.0-alpha.26

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.
@@ -3,7 +3,7 @@ require "json"
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
 
5
5
  # Global Variable Defaults
6
- $MLRN_NATIVE_VERSION ||= "6.17.1"
6
+ $MLRN_NATIVE_VERSION ||= "6.22.1"
7
7
  $MLRN_SPM_SPEC ||= {
8
8
  url: "https://github.com/maplibre/maplibre-gl-native-distribution",
9
9
  requirement: {
@@ -5,7 +5,7 @@ org.maplibre.reactnative.compileSdkVersion=35
5
5
  org.maplibre.reactnative.ndkVersion=27.1.12297006
6
6
 
7
7
  # MapLibre React Native
8
- org.maplibre.reactnative.nativeVersion=11.12.1
8
+ org.maplibre.reactnative.nativeVersion=12.2.3
9
9
  org.maplibre.reactnative.nativeVariant=opengl
10
10
  org.maplibre.reactnative.pluginVersion=3.0.2
11
11
  org.maplibre.reactnative.turfVersion=6.0.1
@@ -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 = WritableNativeArray()
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 = WritableNativeMap()
1190
+ val viewState: WritableMap = Arguments.createMap()
1193
1191
 
1194
1192
  if (position.target == null) {
1195
1193
  return viewState
1196
1194
  }
1197
1195
 
1198
- viewState.putDouble("longitude", position.target!!.longitude)
1199
- viewState.putDouble("latitude", position.target!!.latitude)
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.24",
4
+ "version": "11.0.0-alpha.26",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true