@maplibre/maplibre-react-native 11.0.0-beta.26 → 11.0.0-beta.27
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.
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNAndroidTextureMapViewManager.kt +2 -0
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt +5 -1
- package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewModule.kt +0 -5
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ package org.maplibre.reactnative.components.mapview
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.module.annotations.ReactModule
|
|
5
5
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
6
|
+
import org.maplibre.android.MapLibre
|
|
6
7
|
import org.maplibre.android.maps.MapLibreMapOptions
|
|
7
8
|
|
|
8
9
|
@ReactModule(name = MLRNAndroidTextureMapViewManager.REACT_CLASS)
|
|
@@ -12,6 +13,7 @@ class MLRNAndroidTextureMapViewManager(
|
|
|
12
13
|
override fun getName(): String = REACT_CLASS
|
|
13
14
|
|
|
14
15
|
override fun createViewInstance(themedReactContext: ThemedReactContext): MLRNAndroidTextureMapView {
|
|
16
|
+
MapLibre.getInstance(themedReactContext.applicationContext)
|
|
15
17
|
val options = MapLibreMapOptions.createFromAttributes(themedReactContext)
|
|
16
18
|
options.textureMode(true)
|
|
17
19
|
|
package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewManager.kt
CHANGED
|
@@ -14,6 +14,7 @@ import com.facebook.react.uimanager.ViewManagerDelegate
|
|
|
14
14
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
15
15
|
import com.facebook.react.viewmanagers.MLRNMapViewManagerDelegate
|
|
16
16
|
import com.facebook.react.viewmanagers.MLRNMapViewManagerInterface
|
|
17
|
+
import org.maplibre.android.MapLibre
|
|
17
18
|
|
|
18
19
|
@ReactModule(name = MLRNMapViewManager.REACT_CLASS)
|
|
19
20
|
open class MLRNMapViewManager(
|
|
@@ -69,7 +70,10 @@ open class MLRNMapViewManager(
|
|
|
69
70
|
parent.removeFeature(index)
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
override fun createViewInstance(themedReactContext: ThemedReactContext): MLRNMapView
|
|
73
|
+
override fun createViewInstance(themedReactContext: ThemedReactContext): MLRNMapView {
|
|
74
|
+
MapLibre.getInstance(themedReactContext.applicationContext)
|
|
75
|
+
return MLRNMapView(themedReactContext, options = null)
|
|
76
|
+
}
|
|
73
77
|
|
|
74
78
|
override fun onDropViewInstance(mapView: MLRNMapView) {
|
|
75
79
|
val reactTag = mapView.id
|
package/android/src/main/java/org/maplibre/reactnative/components/mapview/MLRNMapViewModule.kt
CHANGED
|
@@ -5,7 +5,6 @@ import com.facebook.react.bridge.Promise
|
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
6
|
import com.facebook.react.bridge.ReadableArray
|
|
7
7
|
import com.facebook.react.module.annotations.ReactModule
|
|
8
|
-
import org.maplibre.android.MapLibre
|
|
9
8
|
import org.maplibre.reactnative.NativeMapViewModuleSpec
|
|
10
9
|
import org.maplibre.reactnative.utils.ConvertUtils
|
|
11
10
|
import org.maplibre.reactnative.utils.ExpressionParser
|
|
@@ -22,10 +21,6 @@ class MLRNMapViewModule(
|
|
|
22
21
|
const val NAME = "MLRNMapViewModule"
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
override fun initialize() {
|
|
26
|
-
reactApplicationContext.runOnUiQueueThread { MapLibre.getInstance(reactApplicationContext) }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
24
|
private fun withViewportOnUIThread(
|
|
30
25
|
reactTag: ReactTag,
|
|
31
26
|
promise: Promise,
|
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-beta.
|
|
4
|
+
"version": "11.0.0-beta.27",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"provenance": true
|