@rnmapbox/maps 10.1.10 → 10.1.12
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/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt +4 -4
- package/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt +6 -4
- package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocation.kt +20 -23
- package/android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXOfflineModule.kt +87 -72
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/ExpressionParser.java +10 -4
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/Logger.kt +1 -1
- package/android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt +16 -0
- package/ios/RNMBX/RNMBXNativeUserLocation.swift +19 -25
- package/lib/typescript/src/components/AbstractLayer.d.ts +1 -1
- package/lib/typescript/src/components/AbstractLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Annotation.d.ts +2 -2
- package/lib/typescript/src/components/Annotation.d.ts.map +1 -1
- package/lib/typescript/src/components/Atmosphere.d.ts +1 -1
- package/lib/typescript/src/components/Atmosphere.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayer.d.ts +2 -2
- package/lib/typescript/src/components/BackgroundLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Callout.d.ts +1 -1
- package/lib/typescript/src/components/Callout.d.ts.map +1 -1
- package/lib/typescript/src/components/Camera.d.ts +10 -10
- package/lib/typescript/src/components/Camera.d.ts.map +1 -1
- package/lib/typescript/src/components/CircleLayer.d.ts +4 -4
- package/lib/typescript/src/components/CircleLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts +1 -1
- package/lib/typescript/src/components/CustomLocationProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts +2 -2
- package/lib/typescript/src/components/FillExtrusionLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/FillLayer.d.ts +4 -4
- package/lib/typescript/src/components/FillLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts +1 -1
- package/lib/typescript/src/components/HeadingIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/HeatmapLayer.d.ts +4 -4
- package/lib/typescript/src/components/HeatmapLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/ImageSource.d.ts +3 -3
- package/lib/typescript/src/components/ImageSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Images.d.ts +6 -6
- package/lib/typescript/src/components/Images.d.ts.map +1 -1
- package/lib/typescript/src/components/LineLayer.d.ts +4 -4
- package/lib/typescript/src/components/LineLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/LocationPuck.d.ts +2 -2
- package/lib/typescript/src/components/LocationPuck.d.ts.map +1 -1
- package/lib/typescript/src/components/MapView.d.ts +11 -11
- package/lib/typescript/src/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts +1 -1
- package/lib/typescript/src/components/MarkerView.d.ts.map +1 -1
- package/lib/typescript/src/components/ModelLayer.d.ts +4 -4
- package/lib/typescript/src/components/ModelLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Models.d.ts +1 -1
- package/lib/typescript/src/components/Models.d.ts.map +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts +1 -1
- package/lib/typescript/src/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/PointAnnotation.d.ts +4 -4
- package/lib/typescript/src/components/PointAnnotation.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterDemSource.d.ts +2 -2
- package/lib/typescript/src/components/RasterDemSource.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterLayer.d.ts +4 -4
- package/lib/typescript/src/components/RasterLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/RasterSource.d.ts +2 -2
- package/lib/typescript/src/components/RasterSource.d.ts.map +1 -1
- package/lib/typescript/src/components/ShapeSource.d.ts +2 -2
- package/lib/typescript/src/components/ShapeSource.d.ts.map +1 -1
- package/lib/typescript/src/components/SkyLayer.d.ts +2 -2
- package/lib/typescript/src/components/SkyLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Style.d.ts +4 -4
- package/lib/typescript/src/components/Style.d.ts.map +1 -1
- package/lib/typescript/src/components/StyleImport.d.ts +1 -1
- package/lib/typescript/src/components/StyleImport.d.ts.map +1 -1
- package/lib/typescript/src/components/SymbolLayer.d.ts +4 -4
- package/lib/typescript/src/components/SymbolLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/Terrain.d.ts +1 -1
- package/lib/typescript/src/components/Terrain.d.ts.map +1 -1
- package/lib/typescript/src/components/UserLocation.d.ts +2 -2
- package/lib/typescript/src/components/UserLocation.d.ts.map +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts +1 -1
- package/lib/typescript/src/components/VectorSource.d.ts.map +1 -1
- package/lib/typescript/src/components/Viewport.d.ts +10 -10
- package/lib/typescript/src/components/Viewport.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/OfflineCreatePackOptions.d.ts +1 -1
- package/lib/typescript/src/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/OfflinePack.d.ts +1 -1
- package/lib/typescript/src/modules/offline/OfflinePack.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/OfflinePackLegacy.d.ts +1 -1
- package/lib/typescript/src/modules/offline/OfflinePackLegacy.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/TileStore.d.ts +2 -2
- package/lib/typescript/src/modules/offline/TileStore.d.ts.map +1 -1
- package/lib/typescript/src/modules/offline/offlineManager.d.ts +6 -6
- package/lib/typescript/src/modules/offline/offlineManager.d.ts.map +1 -1
- package/lib/typescript/src/modules/snapshot/SnapshotOptions.d.ts +1 -1
- package/lib/typescript/src/modules/snapshot/SnapshotOptions.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeRNMBXMovePointShapeAnimatorModule.d.ts +1 -1
- package/lib/typescript/src/specs/NativeRNMBXMovePointShapeAnimatorModule.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeRNMBXTileStoreModule.d.ts +5 -5
- package/lib/typescript/src/specs/NativeRNMBXTileStoreModule.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeRNMBXViewportModule.d.ts +7 -7
- package/lib/typescript/src/specs/NativeRNMBXViewportModule.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXBackgroundLayerNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXBackgroundLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts +2 -2
- package/lib/typescript/src/specs/RNMBXCameraNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXCircleLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXCustomLocationProviderNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXFillExtrusionLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXFillLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXHeatmapLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXImagesNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXImagesNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXLineLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts +12 -12
- package/lib/typescript/src/specs/RNMBXMapViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXMarkerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXModelLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXModelsNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXNativeUserLocationNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXPointAnnotationNativeComponent.d.ts +5 -5
- package/lib/typescript/src/specs/RNMBXPointAnnotationNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXRasterLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXShapeSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXSkyLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts +3 -3
- package/lib/typescript/src/specs/RNMBXSymbolLayerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts +1 -1
- package/lib/typescript/src/specs/RNMBXVectorSourceNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/RNMBXViewportNativeComponent.d.ts +10 -10
- package/lib/typescript/src/specs/RNMBXViewportNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/codegenUtils.d.ts +4 -4
- package/lib/typescript/src/specs/codegenUtils.d.ts.map +1 -1
- package/lib/typescript/src/types/BaseProps.d.ts +1 -1
- package/lib/typescript/src/types/BaseProps.d.ts.map +1 -1
- package/lib/typescript/src/types/OnPressEvent.d.ts +1 -1
- package/lib/typescript/src/types/OnPressEvent.d.ts.map +1 -1
- package/lib/typescript/src/types/Position.d.ts +1 -1
- package/lib/typescript/src/types/Position.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/BridgeValue.d.ts +3 -3
- package/lib/typescript/src/utils/BridgeValue.d.ts.map +1 -1
- package/lib/typescript/src/utils/Logger.d.ts +2 -2
- package/lib/typescript/src/utils/Logger.d.ts.map +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts +1 -1
- package/lib/typescript/src/utils/StyleValue.d.ts.map +1 -1
- package/lib/typescript/src/utils/checkRequiredProps.d.ts +1 -1
- package/lib/typescript/src/utils/checkRequiredProps.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +2 -2
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts +1 -1
- package/lib/typescript/src/utils/nativeRef.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/Logger.d.ts +3 -3
- package/lib/typescript/src/web/utils/Logger.d.ts.map +1 -1
- package/package.json +2 -2
- package/plugin/build/generateCode.d.ts +1 -1
- package/plugin/build/withMapbox.d.ts +2 -2
|
@@ -113,7 +113,7 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
fun setStop(stop: CameraStop) {
|
|
116
|
-
if (stop.ts != mCameraStop?.ts) {
|
|
116
|
+
if ((stop.ts != mCameraStop?.ts) || (mCameraStop == null)) {
|
|
117
117
|
mCameraStop = stop
|
|
118
118
|
stop.setCallback(mCameraCallback)
|
|
119
119
|
if (mMapView != null) {
|
|
@@ -136,17 +136,17 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
|
|
|
136
136
|
_updateViewportState()
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
fun setFollowZoomLevel(zoomLevel: Double) {
|
|
139
|
+
fun setFollowZoomLevel(zoomLevel: Double?) {
|
|
140
140
|
mFollowZoomLevel = zoomLevel
|
|
141
141
|
_updateViewportState();
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
fun setFollowPitch(pitch: Double) {
|
|
144
|
+
fun setFollowPitch(pitch: Double?) {
|
|
145
145
|
mFollowPitch = pitch
|
|
146
146
|
_updateViewportState();
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
fun setFollowHeading(heading: Double) {
|
|
149
|
+
fun setFollowHeading(heading: Double?) {
|
|
150
150
|
mFollowHeading = heading
|
|
151
151
|
_updateViewportState();
|
|
152
152
|
}
|
|
@@ -10,6 +10,8 @@ import com.rnmapbox.rnmbx.components.AbstractEventEmitter
|
|
|
10
10
|
import com.rnmapbox.rnmbx.components.camera.CameraStop.Companion.fromReadableMap
|
|
11
11
|
import com.rnmapbox.rnmbx.utils.GeoJSONUtils.toLatLngBounds
|
|
12
12
|
import com.rnmapbox.rnmbx.utils.extensions.asBooleanOrNull
|
|
13
|
+
import com.rnmapbox.rnmbx.utils.extensions.asDoubleOrNull
|
|
14
|
+
import com.rnmapbox.rnmbx.utils.extensions.asStringOrNull
|
|
13
15
|
|
|
14
16
|
class RNMBXCameraManager(private val mContext: ReactApplicationContext) :
|
|
15
17
|
AbstractEventEmitter<RNMBXCamera?>(
|
|
@@ -71,22 +73,22 @@ class RNMBXCameraManager(private val mContext: ReactApplicationContext) :
|
|
|
71
73
|
|
|
72
74
|
@ReactProp(name = "followUserMode")
|
|
73
75
|
override fun setFollowUserMode(camera: RNMBXCamera, value: Dynamic) {
|
|
74
|
-
camera.setFollowUserMode(value.
|
|
76
|
+
camera.setFollowUserMode(value.asStringOrNull())
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
@ReactProp(name = "followZoomLevel")
|
|
78
80
|
override fun setFollowZoomLevel(camera: RNMBXCamera, value: Dynamic) {
|
|
79
|
-
camera.setFollowZoomLevel(value.
|
|
81
|
+
camera.setFollowZoomLevel(value.asDoubleOrNull())
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
@ReactProp(name = "followPitch")
|
|
83
85
|
override fun setFollowPitch(camera: RNMBXCamera, value: Dynamic) {
|
|
84
|
-
camera.setFollowPitch(value.
|
|
86
|
+
camera.setFollowPitch(value.asDoubleOrNull())
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
@ReactProp(name = "followHeading")
|
|
88
90
|
override fun setFollowHeading(camera: RNMBXCamera, value: Dynamic) {
|
|
89
|
-
camera.setFollowHeading(value.
|
|
91
|
+
camera.setFollowHeading(value.asDoubleOrNull())
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
@ReactProp(name = "followPadding")
|
package/android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocation.kt
CHANGED
|
@@ -46,6 +46,7 @@ enum class RenderMode {
|
|
|
46
46
|
class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), OnMapReadyCallback, Style.OnStyleLoaded {
|
|
47
47
|
private var mEnabled = true
|
|
48
48
|
private var mMap: MapboxMap? = null
|
|
49
|
+
private var mMBXMapView: RNMBXMapView? = null
|
|
49
50
|
private var mRenderMode : RenderMode = RenderMode.NORMAL;
|
|
50
51
|
private var mContext : Context = context
|
|
51
52
|
|
|
@@ -63,7 +64,7 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
63
64
|
SHADOW
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
private var imageNames = mutableMapOf<PuckImagePart, String
|
|
67
|
+
private var imageNames = mutableMapOf<PuckImagePart, String?>()
|
|
67
68
|
private var subscriptions = mutableMapOf<PuckImagePart, Subscription>()
|
|
68
69
|
private var images = mutableMapOf<PuckImagePart, ImageHolder>()
|
|
69
70
|
|
|
@@ -98,23 +99,10 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
private fun imageNameUpdated(image: PuckImagePart, name: String?) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
imageNames.remove(image)
|
|
105
|
-
}
|
|
106
|
-
subscriptions[image]?.let {
|
|
107
|
-
it.cancel()
|
|
108
|
-
}
|
|
109
|
-
subscriptions.remove(image)
|
|
110
|
-
|
|
111
|
-
if (name == null) {
|
|
112
|
-
imageUpdated(image, null)
|
|
113
|
-
return
|
|
102
|
+
imageNames[image] = name
|
|
103
|
+
mMBXMapView?.let {
|
|
104
|
+
_fetchImages(it)
|
|
114
105
|
}
|
|
115
|
-
|
|
116
|
-
imageManager?.let { subscribe(it, image, name) }
|
|
117
|
-
|
|
118
106
|
}
|
|
119
107
|
|
|
120
108
|
private fun imageUpdated(image: PuckImagePart, imageHolder: ImageHolder?) {
|
|
@@ -208,6 +196,7 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
208
196
|
mapView.getMapboxMap()
|
|
209
197
|
mapView.getMapAsync(this)
|
|
210
198
|
mMapView?.locationComponentManager?.showNativeUserLocation(true)
|
|
199
|
+
mMBXMapView = mapView
|
|
211
200
|
_fetchImages(mapView)
|
|
212
201
|
_apply()
|
|
213
202
|
}
|
|
@@ -216,6 +205,7 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
216
205
|
mEnabled = false
|
|
217
206
|
mMapView?.locationComponentManager?.showNativeUserLocation(false)
|
|
218
207
|
mMap?.getStyle(this)
|
|
208
|
+
mMBXMapView = null
|
|
219
209
|
return super.removeFromMap(mapView, reason)
|
|
220
210
|
}
|
|
221
211
|
|
|
@@ -244,7 +234,6 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
244
234
|
subscriptions.remove(image)
|
|
245
235
|
Logger.e("RNMBXNativeUserLocation", "subscribe: there is alread a subscription for image: $image")
|
|
246
236
|
}
|
|
247
|
-
|
|
248
237
|
subscriptions[image] = imageManager.subscribe(name, Resolver { _, imageData ->
|
|
249
238
|
imageUpdated(image, imageData.toImageHolder())
|
|
250
239
|
})
|
|
@@ -260,19 +249,27 @@ class RNMBXNativeUserLocation(context: Context) : AbstractMapFeature(context), O
|
|
|
260
249
|
private fun _fetchImages(map: RNMBXMapView) {
|
|
261
250
|
map.mapView?.getMapboxMap()?.getStyle()?.let { style ->
|
|
262
251
|
imageNames.forEach { (part,name) ->
|
|
263
|
-
if (
|
|
264
|
-
style.
|
|
265
|
-
|
|
252
|
+
if (name != null) {
|
|
253
|
+
if (style.hasStyleImage(name)) {
|
|
254
|
+
style.getStyleImage(name)?.let { image ->
|
|
255
|
+
images[part] = image.toImageHolder()
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
images.remove(part)
|
|
266
259
|
}
|
|
260
|
+
} else {
|
|
261
|
+
images.remove(part)
|
|
267
262
|
}
|
|
268
263
|
}
|
|
269
264
|
}
|
|
270
|
-
|
|
271
265
|
removeSubscriptions()
|
|
272
266
|
val imageManager = map.imageManager
|
|
273
267
|
this.imageManager = imageManager
|
|
268
|
+
_apply()
|
|
274
269
|
imageNames.forEach { (part,name) ->
|
|
275
|
-
|
|
270
|
+
if (name != null) {
|
|
271
|
+
subscribe(imageManager, part, name)
|
|
272
|
+
}
|
|
276
273
|
}
|
|
277
274
|
}
|
|
278
275
|
// endregion
|
|
@@ -154,10 +154,9 @@ class RNMBXOfflineModule(private val mReactContext: ReactApplicationContext) :
|
|
|
154
154
|
metadata = metadata
|
|
155
155
|
)
|
|
156
156
|
tileRegionPacks[id] = actPack
|
|
157
|
-
startLoading(pack = actPack)
|
|
158
|
-
promise.resolve(
|
|
157
|
+
startLoading(pack = actPack).map {
|
|
159
158
|
writableMapOf("bounds" to boundsStr, "metadata" to metadataStr)
|
|
160
|
-
)
|
|
159
|
+
}.toPromise(promise, "createPack")
|
|
161
160
|
} catch (e: Throwable) {
|
|
162
161
|
promise.reject("createPack", e)
|
|
163
162
|
}
|
|
@@ -196,8 +195,7 @@ class RNMBXOfflineModule(private val mReactContext: ReactApplicationContext) :
|
|
|
196
195
|
fun resumePackDownload(name: String, promise: Promise) {
|
|
197
196
|
val pack = tileRegionPacks[name]
|
|
198
197
|
if (pack != null) {
|
|
199
|
-
startLoading(pack)
|
|
200
|
-
promise.resolve(null)
|
|
198
|
+
startLoading(pack).map { null }.toPromise(promise,"resumePackDownload")
|
|
201
199
|
} else {
|
|
202
200
|
promise.reject("resumePackDownload", "Unknown offline pack: $name")
|
|
203
201
|
}
|
|
@@ -271,74 +269,83 @@ class RNMBXOfflineModule(private val mReactContext: ReactApplicationContext) :
|
|
|
271
269
|
}
|
|
272
270
|
// endregion
|
|
273
271
|
|
|
274
|
-
fun startLoading(pack: TileRegionPack) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
.
|
|
299
|
-
|
|
300
|
-
.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
272
|
+
fun startLoading(pack: TileRegionPack): Result<Unit> {
|
|
273
|
+
try {
|
|
274
|
+
val id = pack.name
|
|
275
|
+
val bounds = pack.bounds
|
|
276
|
+
?: return Result.failure(IllegalArgumentException("startLoading failed as there are no bounds in pack"))
|
|
277
|
+
val zoomRange = pack.zoomRange
|
|
278
|
+
?: return Result.failure(IllegalArgumentException("startLoading failed as there is no zoomRange in pack"))
|
|
279
|
+
val styleURI = pack.styleURI
|
|
280
|
+
?: return Result.failure(IllegalArgumentException("startLoading failed as there is no styleURI in pack"))
|
|
281
|
+
val metadata = pack.metadata
|
|
282
|
+
?: return Result.failure(IllegalArgumentException("startLoading failed as there is no metadata in pack"))
|
|
283
|
+
|
|
284
|
+
val stylePackOptions = StylePackLoadOptions.Builder()
|
|
285
|
+
.glyphsRasterizationMode(GlyphsRasterizationMode.IDEOGRAPHS_RASTERIZED_LOCALLY)
|
|
286
|
+
.metadata(metadata.toMapboxValue())
|
|
287
|
+
.build()
|
|
288
|
+
|
|
289
|
+
val descriptorOptions = TilesetDescriptorOptions.Builder()
|
|
290
|
+
.styleURI(styleURI)
|
|
291
|
+
.minZoom(zoomRange.minZoom)
|
|
292
|
+
.maxZoom(zoomRange.maxZoom)
|
|
293
|
+
.stylePackOptions(stylePackOptions)
|
|
294
|
+
.pixelRatio(2.0f)
|
|
295
|
+
.build()
|
|
296
|
+
val tilesetDescriptor = offlineManager.createTilesetDescriptor(descriptorOptions)
|
|
297
|
+
|
|
298
|
+
val loadOptions = TileRegionLoadOptions.Builder()
|
|
299
|
+
.geometry(bounds)
|
|
300
|
+
.descriptors(arrayListOf(tilesetDescriptor))
|
|
301
|
+
.metadata(metadata.toMapboxValue())
|
|
302
|
+
.acceptExpired(true)
|
|
303
|
+
.networkRestriction(NetworkRestriction.NONE)
|
|
304
|
+
.averageBytesPerSecond(null)
|
|
305
|
+
.build()
|
|
306
|
+
|
|
307
|
+
var lastProgress: TileRegionLoadProgress? = null
|
|
308
|
+
val task = this.tileStore.loadTileRegion(
|
|
309
|
+
id, loadOptions,
|
|
310
|
+
{ progress ->
|
|
311
|
+
lastProgress = progress
|
|
312
|
+
tileRegionPacks[id]!!.progress = progress
|
|
313
|
+
tileRegionPacks[id]!!.state = TileRegionPackState.ACTIVE
|
|
314
|
+
|
|
315
|
+
offlinePackProgressDidChange(progress, metadata, TileRegionPackState.ACTIVE)
|
|
316
|
+
},
|
|
317
|
+
{ expected ->
|
|
318
|
+
expected.value?.also {
|
|
319
|
+
val progress = lastProgress
|
|
320
|
+
if (progress != null) {
|
|
321
|
+
offlinePackProgressDidChange(
|
|
322
|
+
progress,
|
|
323
|
+
metadata,
|
|
324
|
+
TileRegionPackState.COMPLETE
|
|
325
|
+
)
|
|
326
|
+
} else {
|
|
327
|
+
Logger.w(
|
|
328
|
+
LOG_TAG,
|
|
329
|
+
"startLoading: tile region completed, but got no progress information"
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
tileRegionPacks[id]!!.state = TileRegionPackState.COMPLETE
|
|
333
|
+
} ?: run {
|
|
334
|
+
val error = expected.error ?: TileRegionError(
|
|
335
|
+
TileRegionErrorType.OTHER,
|
|
336
|
+
"$LOG_TAG neither value nor error in expected"
|
|
337
|
+
)
|
|
335
338
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
tileRegionPacks[id]!!.state = TileRegionPackState.INACTIVE
|
|
340
|
+
offlinePackDidReceiveError(name = id, error = error)
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
)
|
|
344
|
+
tileRegionPacks[id]!!.cancelable = task
|
|
345
|
+
return Result.success(Unit)
|
|
346
|
+
} catch (e: Exception) {
|
|
347
|
+
return Result.failure(e)
|
|
348
|
+
}
|
|
342
349
|
}
|
|
343
350
|
|
|
344
351
|
private fun convertRegionsToJSON(tileRegions: List<TileRegion>, promise: Promise) {
|
|
@@ -641,6 +648,14 @@ class RNMBXOfflineModule(private val mReactContext: ReactApplicationContext) :
|
|
|
641
648
|
}
|
|
642
649
|
}
|
|
643
650
|
|
|
651
|
+
private fun <T> Result<T>.toPromise(promise: Promise, error: String) {
|
|
652
|
+
val ok = getOrElse {
|
|
653
|
+
promise.reject(error, exceptionOrNull() ?: Exception("Unknown error"))
|
|
654
|
+
return@toPromise
|
|
655
|
+
}
|
|
656
|
+
promise.resolve(ok)
|
|
657
|
+
}
|
|
658
|
+
|
|
644
659
|
fun TileRegionLoadProgress.toPercentage(): Double {
|
|
645
660
|
return (completedResourceCount.toDouble() * 100.0) / (requiredResourceCount.toDouble())
|
|
646
661
|
}
|
|
@@ -6,12 +6,14 @@ import com.facebook.react.bridge.ReadableMap;
|
|
|
6
6
|
import com.google.gson.Gson;
|
|
7
7
|
import com.google.gson.JsonArray;
|
|
8
8
|
import com.mapbox.maps.extension.style.expressions.generated.Expression;
|
|
9
|
+
import com.rnmapbox.rnmbx.utils.Logger;
|
|
9
10
|
|
|
10
11
|
import java.util.Locale;
|
|
11
12
|
|
|
12
13
|
import javax.annotation.Nullable;
|
|
13
14
|
|
|
14
15
|
public class ExpressionParser {
|
|
16
|
+
static final String LOG_TAG = "RNMBXMapView";
|
|
15
17
|
static final String TYPE_STRING = "string";
|
|
16
18
|
static final String TYPE_ARRAY = "array";
|
|
17
19
|
static final String TYPE_NUMBER = "number";
|
|
@@ -22,10 +24,14 @@ public class ExpressionParser {
|
|
|
22
24
|
if (rawExpressions == null || rawExpressions.size() == 0) {
|
|
23
25
|
return null;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
try {
|
|
28
|
+
JsonArray array = ConvertUtils.toJsonArray(rawExpressions);
|
|
29
|
+
String jsonString = new Gson().toJson(array);
|
|
30
|
+
return Expression.fromRaw(jsonString);
|
|
31
|
+
} catch (Exception e) {
|
|
32
|
+
Logger.e(LOG_TAG, "An error occurred while attempting to parse the expression", e);
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
public static @Nullable Expression fromTyped(ReadableMap rawExpressions) {
|
|
@@ -62,4 +62,20 @@ fun Dynamic.asBooleanOrNull(): Boolean? {
|
|
|
62
62
|
} else {
|
|
63
63
|
asBoolean()
|
|
64
64
|
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
fun Dynamic.asDoubleOrNull(): Double? {
|
|
68
|
+
return if (isNull) {
|
|
69
|
+
null
|
|
70
|
+
} else {
|
|
71
|
+
asDouble()
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
fun Dynamic.asStringOrNull(): String? {
|
|
76
|
+
return if (isNull) {
|
|
77
|
+
null
|
|
78
|
+
} else {
|
|
79
|
+
asString()
|
|
80
|
+
}
|
|
65
81
|
}
|
|
@@ -20,7 +20,7 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
20
20
|
case shadow
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
var imageNames: [PuckImagePart: String] = [:]
|
|
23
|
+
var imageNames: [PuckImagePart: String?] = [:]
|
|
24
24
|
var subscriptions: [PuckImagePart: ImageManager.Subscription] = [:]
|
|
25
25
|
var images: [PuckImagePart: UIImage] = [:]
|
|
26
26
|
|
|
@@ -63,12 +63,12 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
63
63
|
switch(value) {
|
|
64
64
|
case "heading":
|
|
65
65
|
_puckBearing = .heading
|
|
66
|
-
case "
|
|
66
|
+
case "course":
|
|
67
67
|
_puckBearing = .course
|
|
68
68
|
case nil:
|
|
69
69
|
_puckBearing = nil
|
|
70
70
|
default:
|
|
71
|
-
Logger.error("RNMBXNativeUserLocation puckBearing is
|
|
71
|
+
Logger.error("RNMBXNativeUserLocation puckBearing is unrecognized: \(optional: value)")
|
|
72
72
|
_puckBearing = nil
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -87,18 +87,8 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
87
87
|
|
|
88
88
|
func imageNameUpdated(_ image: PuckImagePart, _ name: String?) {
|
|
89
89
|
imageNames[image] = name
|
|
90
|
-
if let
|
|
91
|
-
|
|
92
|
-
subscriptions.removeValue(forKey: image)
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
guard let name = name else {
|
|
96
|
-
imageUpdated(image, nil)
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if let imageManager = imageManager {
|
|
101
|
-
subscribe(imageManager, image, name)
|
|
90
|
+
if let map = self.map {
|
|
91
|
+
_fetchImages(map)
|
|
102
92
|
}
|
|
103
93
|
}
|
|
104
94
|
|
|
@@ -132,11 +122,11 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
132
122
|
return Value.constant(0.0)
|
|
133
123
|
}
|
|
134
124
|
default:
|
|
135
|
-
Logger.error("toDoubleValue: \(name): has unknown type: \(type(of:value)) \(value) ")
|
|
125
|
+
Logger.error("toDoubleValue: \(name): has unknown type: \(type(of:value)) \(optional: value) ")
|
|
136
126
|
return .constant(1.0)
|
|
137
127
|
}
|
|
138
128
|
}
|
|
139
|
-
|
|
129
|
+
|
|
140
130
|
func _apply() {
|
|
141
131
|
guard let map = self.map else {
|
|
142
132
|
return
|
|
@@ -145,10 +135,6 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
145
135
|
Logger.error("RNMBXNativeUserLocation mapView was nil")
|
|
146
136
|
return
|
|
147
137
|
}
|
|
148
|
-
_apply(mapView)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
func _apply(_ mapView: MapView) {
|
|
152
138
|
guard let location = mapView.location else {
|
|
153
139
|
Logger.error("RNMBXNativeUserLocation location was nil")
|
|
154
140
|
return
|
|
@@ -195,7 +181,7 @@ public class RNMBXNativeUserLocation: UIView, RNMBXMapComponent {
|
|
|
195
181
|
pulsingConfig.radius = .constant(radius.doubleValue)
|
|
196
182
|
}
|
|
197
183
|
|
|
198
|
-
if let color = pulsing["color"]
|
|
184
|
+
if let color = pulsing["color"] {
|
|
199
185
|
if let uicolor = RCTConvert.uiColor(color) {
|
|
200
186
|
pulsingConfig.color = uicolor
|
|
201
187
|
} else {
|
|
@@ -264,8 +250,14 @@ extension RNMBXNativeUserLocation {
|
|
|
264
250
|
func _fetchImages(_ map: RNMBXMapView) {
|
|
265
251
|
if let style = map.mapView?.mapboxMap?.style {
|
|
266
252
|
imageNames.forEach { (part, name) in
|
|
267
|
-
if
|
|
268
|
-
|
|
253
|
+
if let name = name {
|
|
254
|
+
if style.imageExists(withId: name), let image = style.image(withId: name) {
|
|
255
|
+
images[part] = image
|
|
256
|
+
} else {
|
|
257
|
+
images.removeValue(forKey: part)
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
images.removeValue(forKey: part)
|
|
269
261
|
}
|
|
270
262
|
}
|
|
271
263
|
}
|
|
@@ -274,7 +266,9 @@ extension RNMBXNativeUserLocation {
|
|
|
274
266
|
removeSubscriptions()
|
|
275
267
|
self.imageManager = imageManager
|
|
276
268
|
imageNames.forEach { (part,name) in
|
|
277
|
-
|
|
269
|
+
if let name = name {
|
|
270
|
+
subscribe(imageManager, part, name)
|
|
271
|
+
}
|
|
278
272
|
}
|
|
279
273
|
}
|
|
280
274
|
|
|
@@ -3,7 +3,7 @@ import { NativeMethods, processColor } from 'react-native';
|
|
|
3
3
|
import { AllLayerStyleProps, FilterExpression } from '../utils/MapboxStyles';
|
|
4
4
|
import { StyleValue } from '../utils/StyleValue';
|
|
5
5
|
import type { BaseProps } from '../types/BaseProps';
|
|
6
|
-
|
|
6
|
+
type PropsBase = BaseProps & {
|
|
7
7
|
id: string;
|
|
8
8
|
existing?: boolean;
|
|
9
9
|
sourceID?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/AbstractLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"AbstractLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/AbstractLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,KAAK,SAAS,GAAG,SAAS,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AAEF,cAAM,aAAa,CACjB,SAAS,SAAS,SAAS,EAC3B,eAAe,CACf,SAAQ,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;IACtC,IAAI,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;QAC1C,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;SAAE,CAAC;KAC5C,CAeA;IAED,WAAW,EACP,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,GAC5D,IAAI,CAAQ;IAEhB,cAAc,aAER,CAAC,MAAM,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,aAAa,CAAC,CAAC,GAC5D,IAAI,UAGR;IAEF,qBAAqB,CAAC,SAAS,EAAE,MAAM;IAOvC,QAAQ,CACN,KAAK,EAAE,kBAAkB,GAAG,SAAS,GACpC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,GAAG,SAAS;IAI5C,cAAc,CAAC,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAYjD;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { Point } from 'geojson';
|
|
|
3
3
|
import { AnimatedPoint } from '../classes';
|
|
4
4
|
import { OnPressEvent } from '../types/OnPressEvent';
|
|
5
5
|
import { SymbolLayerStyle } from '../Mapbox';
|
|
6
|
-
|
|
6
|
+
type Props = {
|
|
7
7
|
id: string;
|
|
8
8
|
animated?: boolean;
|
|
9
9
|
animationDuration?: number;
|
|
@@ -14,7 +14,7 @@ declare type Props = {
|
|
|
14
14
|
style?: object;
|
|
15
15
|
icon?: string | number | object;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type AnnotationState = {
|
|
18
18
|
shape: Point | AnimatedPoint | null;
|
|
19
19
|
};
|
|
20
20
|
declare class Annotation extends React.Component<Props, AnnotationState> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../src/components/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,
|
|
1
|
+
{"version":3,"file":"Annotation.d.ts","sourceRoot":"","sources":["../../../../src/components/Annotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACjC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,KAAK,GAAG,aAAa,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,cAAM,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC;IAC9D,MAAM,CAAC,YAAY;;;;MAIjB;gBAEU,KAAK,EAAE,KAAK;IAYxB,kBAAkB,CAAC,SAAS,EAAE,KAAK;IAqCnC,OAAO,CAAC,KAAK,EAAE,YAAY;IAM3B,kBAAkB,CAAC,KAAK,GAAE,OAAO,CAAC,KAAK,CAAM,GAAG,KAAK;IAMrD,IAAI,WAAW,IAAI,gBAAgB,GAAG,SAAS,CAO9C;IAED,MAAM;CAkCP;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AtmosphereLayerStyleProps } from '../utils/MapboxStyles';
|
|
3
3
|
import type { BaseProps } from '../types/BaseProps';
|
|
4
|
-
|
|
4
|
+
type Props = BaseProps & {
|
|
5
5
|
style: AtmosphereLayerStyleProps;
|
|
6
6
|
};
|
|
7
7
|
export declare const Atmosphere: React.MemoExoticComponent<(props: Props) => React.JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Atmosphere.d.ts","sourceRoot":"","sources":["../../../../src/components/Atmosphere.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,
|
|
1
|
+
{"version":3,"file":"Atmosphere.d.ts","sourceRoot":"","sources":["../../../../src/components/Atmosphere.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,KAAK,EAAE,yBAAyB,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,UAAU,oCAAgB,KAAK,uBAU1C,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { FilterExpression, BackgroundLayerStyleProps } from '../utils/MapboxStyles';
|
|
3
3
|
import { StyleValue } from '../utils/StyleValue';
|
|
4
4
|
import AbstractLayer from './AbstractLayer';
|
|
5
|
-
export
|
|
5
|
+
export type Props = {
|
|
6
6
|
/**
|
|
7
7
|
* A string that uniquely identifies the layer in the style to which it is added.
|
|
8
8
|
*/
|
|
@@ -50,7 +50,7 @@ export declare type Props = {
|
|
|
50
50
|
*/
|
|
51
51
|
style?: BackgroundLayerStyleProps;
|
|
52
52
|
} & React.ComponentProps<typeof AbstractLayer>;
|
|
53
|
-
|
|
53
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
54
54
|
reactStyle?: {
|
|
55
55
|
[key: string]: StyleValue;
|
|
56
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/BackgroundLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,
|
|
1
|
+
{"version":3,"file":"BackgroundLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/BackgroundLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAI5C,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AAE/C,KAAK,eAAe,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG;IAC5C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,cAAM,eAAgB,SAAQ,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC;IACjE,MAAM,CAAC,YAAY;;MAEjB;IAEF,MAAM;CAaP;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../../src/components/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAKL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAwCtB,
|
|
1
|
+
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../../src/components/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAKL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAwCtB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,cAAM,OAAQ,SAAQ,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC;IAC9C,IAAI,eAAe,gBAclB;IAED,IAAI,YAAY,YAEf;IAED,qBAAqB,IAAI,SAAS;IAalC,oBAAoB,IAAI,SAAS;IAQjC,MAAM;CAUP;AAED,eAAe,OAAO,CAAC"}
|