@rnmapbox/maps 10.1.10 → 10.1.11
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/modules/RNMBXOfflineModule.kt +87 -72
- 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
|
@@ -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
|
}
|
|
@@ -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 uncrecognized: \(value)")
|
|
71
|
+
Logger.error("RNMBXNativeUserLocation puckBearing is uncrecognized: \(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,
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,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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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"}
|
|
@@ -6,7 +6,7 @@ export declare enum UserTrackingMode {
|
|
|
6
6
|
FollowWithHeading = "compass",
|
|
7
7
|
FollowWithCourse = "course"
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type UserTrackingModeChangeCallback = (event: MapboxGLEvent<'usertrackingmodechange', {
|
|
10
10
|
followUserLocation: boolean;
|
|
11
11
|
followUserMode: UserTrackingMode | null;
|
|
12
12
|
}>) => void;
|
|
@@ -17,7 +17,7 @@ export interface CameraRef {
|
|
|
17
17
|
moveTo: (centerCoordinate: Position, animationDuration?: number) => void;
|
|
18
18
|
zoomTo: (zoomLevel: number, animationDuration?: number) => void;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type CameraStop = {
|
|
21
21
|
/** Allows static check of the data type. For internal use only. */
|
|
22
22
|
readonly type?: 'CameraStop';
|
|
23
23
|
/** The location on which the map should center. */
|
|
@@ -38,7 +38,7 @@ export declare type CameraStop = {
|
|
|
38
38
|
/** The easing or path the camera uses to animate to a new configuration. */
|
|
39
39
|
animationMode?: CameraAnimationMode;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type CameraFollowConfig = {
|
|
42
42
|
/** Whether the map orientation follows the user location. */
|
|
43
43
|
followUserLocation?: boolean;
|
|
44
44
|
/** The mode used to track the user location on the map. */
|
|
@@ -52,7 +52,7 @@ export declare type CameraFollowConfig = {
|
|
|
52
52
|
/** The padding used to position the user location when following. */
|
|
53
53
|
followPadding?: Partial<CameraPadding>;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type CameraMinMaxConfig = {
|
|
56
56
|
/** The lowest allowed zoom level. */
|
|
57
57
|
minZoomLevel?: number;
|
|
58
58
|
/** The highest allowed zoom level. */
|
|
@@ -78,11 +78,11 @@ export interface CameraProps extends CameraStop, CameraFollowConfig, CameraMinMa
|
|
|
78
78
|
*/
|
|
79
79
|
onUserTrackingModeChange?: UserTrackingModeChangeCallback;
|
|
80
80
|
}
|
|
81
|
-
export
|
|
81
|
+
export type CameraBounds = {
|
|
82
82
|
ne: Position;
|
|
83
83
|
sw: Position;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type CameraPadding = {
|
|
86
86
|
/** Left padding in points */
|
|
87
87
|
paddingLeft: number;
|
|
88
88
|
/** Right padding in points */
|
|
@@ -92,13 +92,13 @@ export declare type CameraPadding = {
|
|
|
92
92
|
/** Bottom padding in points */
|
|
93
93
|
paddingBottom: number;
|
|
94
94
|
};
|
|
95
|
-
export
|
|
96
|
-
export
|
|
95
|
+
export type CameraBoundsWithPadding = Partial<CameraPadding> & CameraBounds;
|
|
96
|
+
export type CameraStops = {
|
|
97
97
|
/** Allows static check of the data type. For internal use only. */
|
|
98
98
|
readonly type: 'CameraStops';
|
|
99
99
|
stops: CameraStop[];
|
|
100
100
|
};
|
|
101
|
-
export
|
|
101
|
+
export type CameraAnimationMode = 'flyTo' | 'easeTo' | 'linearTo' | 'moveTo' | 'none';
|
|
102
102
|
/**
|
|
103
103
|
* Controls the perspective from which the user sees the map.
|
|
104
104
|
*
|
|
@@ -119,5 +119,5 @@ export declare type CameraAnimationMode = 'flyTo' | 'easeTo' | 'linearTo' | 'mov
|
|
|
119
119
|
* ```
|
|
120
120
|
*/
|
|
121
121
|
export declare const Camera: React.MemoExoticComponent<React.ForwardRefExoticComponent<CameraProps & React.RefAttributes<CameraRef>>>;
|
|
122
|
-
export
|
|
122
|
+
export type Camera = CameraRef;
|
|
123
123
|
//# sourceMappingURL=Camera.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../src/components/Camera.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAOlD,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,iBAAiB,YAAY;IAC7B,gBAAgB,WAAW;CAC5B;AAED,
|
|
1
|
+
{"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../src/components/Camera.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAOlD,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,iBAAiB,YAAY;IAC7B,gBAAgB,WAAW;CAC5B;AAED,MAAM,MAAM,8BAA8B,GAAG,CAC3C,KAAK,EAAE,aAAa,CAClB,wBAAwB,EACxB;IACE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACzC,CACF,KACE,IAAI,CAAC;AAwDV,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,WAAW,KAAK,IAAI,CAAC;IACtD,SAAS,EAAE,CACT,EAAE,EAAE,QAAQ,EACZ,EAAE,EAAE,QAAQ,EACZ,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EACjC,iBAAiB,CAAC,EAAE,MAAM,KACvB,IAAI,CAAC;IACV,KAAK,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI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ayerStyleProps } from '../utils/MapboxStyles';
|
|
3
3
|
import { StyleValue } from '../utils/StyleValue';
|
|
4
4
|
import AbstractLayer from './AbstractLayer';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
6
|
+
type LayerPropsCommon = {
|
|
7
7
|
/**
|
|
8
8
|
* A string that uniquely identifies the source in the style to which it is added.
|
|
9
9
|
*/
|
|
@@ -53,13 +53,13 @@ declare type LayerPropsCommon = {
|
|
|
53
53
|
*/
|
|
54
54
|
slot?: Slot;
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type Props = LayerPropsCommon & {
|
|
57
57
|
/**
|
|
58
58
|
* Customizable style attributes
|
|
59
59
|
*/
|
|
60
60
|
style?: CircleLayerStyleProps;
|
|
61
61
|
} & React.ComponentProps<typeof AbstractLayer>;
|
|
62
|
-
|
|
62
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
63
63
|
reactStyle?: {
|
|
64
64
|
[key: string]: StyleValue;
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircleLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/CircleLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C,
|
|
1
|
+
{"version":3,"file":"CircleLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/CircleLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,aA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omLocationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,
|
|
1
|
+
{"version":3,"file":"CustomLocationProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomLocationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,sBAAsB,oCAAgB,KAAK,uBAE/C,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { FilterExpression, FillExtrusionLayerStyleProps } 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?: FillExtrusionLayerStyleProps;
|
|
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":"FillExtrusionLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/FillExtrusionLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,O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C5C,CAAC;AAEF;;GAEG;AACH,cAAM,kBAAmB,SAAQ,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC;IACpE,MAAM,CAAC,YAAY;;MAEjB;IAEF,MAAM;CAcP;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { FilterExpression, FillLayerStyleProps } from '../utils/MapboxStyles';
|
|
3
3
|
import { StyleValue } from '../utils/StyleValue';
|
|
4
4
|
import AbstractLayer from './AbstractLayer';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type Slot = 'bottom' | 'middle' | 'top';
|
|
6
|
+
type LayerPropsCommon = {
|
|
7
7
|
/**
|
|
8
8
|
* A string that uniquely identifies the source in the style to which it is added.
|
|
9
9
|
*/
|
|
@@ -53,13 +53,13 @@ declare type LayerPropsCommon = {
|
|
|
53
53
|
*/
|
|
54
54
|
slot?: Slot;
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type Props = LayerPropsCommon & {
|
|
57
57
|
/**
|
|
58
58
|
* Customizable style attributes
|
|
59
59
|
*/
|
|
60
60
|
style?: FillLayerStyleProps;
|
|
61
61
|
} & React.ComponentProps<typeof AbstractLayer>;
|
|
62
|
-
|
|
62
|
+
type NativeTypeProps = Omit<Props, 'style'> & {
|
|
63
63
|
reactStyle?: {
|
|
64
64
|
[key: string]: StyleValue;
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FillLayer.d.ts","sourceRoot":"","sources":["../../../../src/components/FillLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C,
|
|
1
|
+
{"version":3,"file":"FillLayer.d.ts","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cAAM,SAAU,SAAQ,aAAa,CAAC,KAAK,EAAE,eAAe,CAAC;IAC3D,MAAM,CAAC,YAAY;;MAEjB;IAEF,MAAM;CAUP;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/HeadingIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAY/C,
|
|
1
|
+
{"version":3,"file":"HeadingIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/HeadingIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAY/C,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,gBAAgB,gBAAiB,KAAK,sBAmB3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|