@rnmapbox/maps 10.0.0-beta.41 → 10.0.0-beta.43

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.
Files changed (60) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.github/workflows/ios-actions.yml +1 -1
  3. package/android/install.md +20 -1
  4. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/RCTMGLPackage.java +2 -0
  5. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.kt +22 -31
  6. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/RCTMGLStyleFactory.java +26 -0
  7. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphere.kt +59 -0
  8. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/atmosphere/RCTMGLAtmosphereManager.kt +30 -0
  9. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrain.kt +32 -27
  10. package/android/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/styles/terrain/RCTMGLTerrainManager.kt +5 -11
  11. package/docs/Annotations.md +4 -3
  12. package/docs/Camera.md +1 -1
  13. package/docs/HeadingIndicator.md +1 -1
  14. package/docs/MapView.md +2 -2
  15. package/docs/SymbolLayer.md +4 -3
  16. package/docs/Terrain.md +64 -9
  17. package/docs/docs.json +66 -53
  18. package/index.d.ts +13 -80
  19. package/ios/RCTMGL-v10/RCTMGLCamera.swift +28 -26
  20. package/ios/RCTMGL-v10/RCTMGLImages.swift +1 -99
  21. package/ios/RCTMGL-v10/RCTMGLLogging.swift +8 -0
  22. package/ios/RCTMGL-v10/RCTMGLMapView.swift +35 -39
  23. package/ios/RCTMGL-v10/RCTMGLSingletonLayer.swift +7 -1
  24. package/ios/RCTMGL-v10/RCTMGLStyle.swift +34 -0
  25. package/ios/RCTMGL-v10/RCTMGLTerrain.swift +56 -63
  26. package/ios/RCTMGL-v10/RCTMGLTerrainManager.m +2 -3
  27. package/javascript/components/AbstractLayer.tsx +72 -0
  28. package/javascript/components/BackgroundLayer.js +1 -1
  29. package/javascript/components/Camera.tsx +17 -1
  30. package/javascript/components/CircleLayer.js +1 -1
  31. package/javascript/components/FillExtrusionLayer.js +1 -1
  32. package/javascript/components/FillLayer.js +1 -1
  33. package/javascript/components/{HeadingIndicator.js → HeadingIndicator.tsx} +5 -6
  34. package/javascript/components/HeatmapLayer.js +1 -1
  35. package/javascript/components/LineLayer.js +1 -1
  36. package/javascript/components/MapView.js +8 -12
  37. package/javascript/components/RasterLayer.js +1 -1
  38. package/javascript/components/SkyLayer.js +1 -1
  39. package/javascript/components/SymbolLayer.tsx +113 -0
  40. package/javascript/components/Terrain.tsx +52 -0
  41. package/javascript/components/UserLocation.js +1 -1
  42. package/javascript/global.d.ts +4 -0
  43. package/javascript/index.js +8 -4
  44. package/javascript/types/index.ts +0 -14
  45. package/javascript/utils/MapboxStyles.ts +177 -52
  46. package/javascript/utils/StyleValue.ts +8 -6
  47. package/javascript/utils/deprecation.ts +39 -0
  48. package/javascript/utils/{filterUtils.js → filterUtils.tsx} +1 -1
  49. package/javascript/utils/styleMap.ts +26 -0
  50. package/package.json +6 -6
  51. package/scripts/autogenHelpers/DocJSONBuilder.js +2 -3
  52. package/scripts/autogenHelpers/globals.js +20 -7
  53. package/scripts/autogenerate.js +13 -0
  54. package/scripts/templates/MapboxStyles.ts.ejs +8 -3
  55. package/scripts/templates/RCTMGLStyleFactoryv10.java.ejs +1 -0
  56. package/.eslintignore +0 -1
  57. package/javascript/components/AbstractLayer.js +0 -46
  58. package/javascript/components/SymbolLayer.js +0 -120
  59. package/javascript/components/Terrain.js +0 -56
  60. package/javascript/utils/deprecation.js +0 -24
package/.eslintrc.js CHANGED
@@ -78,8 +78,9 @@ module.exports = {
78
78
  'no-unused-expressions': ['error', { allowTaggedTemplates: true }],
79
79
  'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
80
80
  'react-native/no-inline-styles': 0,
81
+ '@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
81
82
  },
82
- ignorePatterns: ['**/rnmapbox.web.symlink'],
83
+ ignorePatterns: ['**/rnmapbox.web.symlink', 'plugin/build/'],
83
84
  overrides: [
84
85
  {
85
86
  // Match TypeScript Files
@@ -64,7 +64,7 @@ jobs:
64
64
  brew install xcbeautify
65
65
 
66
66
  - name: Build for detox
67
- run: yarn detox build --configuration ios.debug | xcbeautify -qq
67
+ run: set -o pipefail && NSUnbufferedIO=YES yarn detox build --configuration ios.debug 2>&1 | xcbeautify -qq
68
68
 
69
69
  - name: Test with detox
70
70
  run: |
@@ -12,7 +12,7 @@ Add `RNMapboxMapsImpl = "mapbox"` to your gradle file - see bellow for details.
12
12
 
13
13
  ### Custom versions
14
14
 
15
- *Warning*: If you set a custome version make sure you revisit, any time you update @rnmapbox/maps. Setting it to earlier version to what we exepect will likely result in a build error.
15
+ *Warning*: If you set a custom version, make sure you revisit, any time you update @rnmapbox/maps. Setting it to earlier version than what we exepect will likely result in a build error.
16
16
 
17
17
  Overwrite mapbox dependencies within your `android/build.gradle > buildscript > ext` section
18
18
 
@@ -32,6 +32,7 @@ buildscript {
32
32
  ```
33
33
 
34
34
 
35
+ If you see `2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs` issue see [possible workaround](#workaround-for-2-files-found-with-path-libarm64-v8alibc_sharedso-from-inputs).
35
36
 
36
37
  ## Using MapLibre
37
38
 
@@ -138,4 +139,22 @@ Feel free to check out the `/example` projects [`android/build.gradle`](https://
138
139
  <br>
139
140
 
140
141
 
142
+ ### Workaround for 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs
143
+
144
+ ```sh
145
+ code android/app/build.gradle
146
+ ```
147
+
148
+ add the following
149
+ ```gradle
150
+ android {
151
+ packagingOptions {
152
+ pickFirst 'lib/x86/libc++_shared.so'
153
+ pickFirst 'lib/x86_64/libc++_shared.so'
154
+ pickFirst 'lib/arm64-v8a/libc++_shared.so'
155
+ pickFirst 'lib/armeabi-v7a/libc++_shared.so'
156
+ }
157
+ }
158
+ ```
159
+
141
160
 
@@ -20,6 +20,7 @@ import com.mapbox.rctmgl.components.images.RCTMGLImagesManager;
20
20
  import com.mapbox.rctmgl.components.location.RCTMGLNativeUserLocationManager;
21
21
  import com.mapbox.rctmgl.components.mapview.RCTMGLMapViewManager;
22
22
  import com.mapbox.rctmgl.components.mapview.RCTMGLAndroidTextureMapViewManager;
23
+ import com.mapbox.rctmgl.components.styles.atmosphere.RCTMGLAtmosphereManager;
23
24
  import com.mapbox.rctmgl.components.styles.layers.RCTMGLBackgroundLayerManager;
24
25
  import com.mapbox.rctmgl.components.styles.layers.RCTMGLCircleLayerManager;
25
26
  import com.mapbox.rctmgl.components.styles.layers.RCTMGLFillExtrusionLayerManager;
@@ -107,6 +108,7 @@ public class RCTMGLPackage implements ReactPackage {
107
108
  managers.add(new RCTMGLRasterLayerManager());
108
109
  managers.add(new RCTMGLSkyLayerManager());
109
110
  managers.add(new RCTMGLTerrainManager());
111
+ managers.add(new RCTMGLAtmosphereManager());
110
112
  managers.add(new RCTMGLBackgroundLayerManager());
111
113
 
112
114
  managers.add(new RCTMGLLightManager());
@@ -159,7 +159,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
159
159
  override fun onStyleLoaded(style: Style) {
160
160
  savedStyle = style
161
161
  setUpImage(style)
162
- addQueuedFeatures()
162
+ addQueuedFeaturesToMap()
163
163
  setupLocalization(style)
164
164
  }
165
165
  })
@@ -305,26 +305,29 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
305
305
  mCameraChangeTracker.setReason(CameraChangeTracker.EMPTY)
306
306
  }
307
307
 
308
- private fun removeAllSourcesFromMap() {
309
- if (mSources.size == 0) {
310
- return
311
- }
312
- for (key in mSources.keys) {
313
- val source = mSources[key]
314
- source?.removeFromMap(this)
315
- }
308
+ private fun removeAllFeaturesFromMap() {
309
+ mFeatures.forEach { it -> it.removeFromMap(this) }
316
310
  }
317
311
 
318
- private fun addAllSourcesToMap() {
319
- if (mSources.size == 0) {
320
- return
321
- }
322
- for (key in mSources.keys) {
323
- val source = mSources[key]
324
- source?.addToMap(this)
312
+ private fun addQueuedFeaturesToMap() {
313
+ mQueuedFeatures?.let { queuedFeatures ->
314
+ queuedFeatures.forEach {
315
+ it.addToMap(this)
316
+ mFeatures.add(it)
317
+ }
318
+ queuedFeatures.clear()
325
319
  }
320
+ mQueuedFeatures = null;
326
321
  }
327
322
 
323
+ private fun addAllFeaturesToMap() {
324
+ mQueuedFeatures?.also {
325
+ this.addQueuedFeaturesToMap()
326
+ } ?: run {
327
+ mFeatures.forEach { it.addToMap(this) }
328
+ }
329
+ }
330
+
328
331
  private val allTouchableSources: List<RCTSource<*>>
329
332
  private get() {
330
333
  val sources: MutableList<RCTSource<*>> = ArrayList()
@@ -380,19 +383,18 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
380
383
 
381
384
  fun setReactStyleURL(styleURL: String) {
382
385
  if (mMap != null) {
383
- removeAllSourcesFromMap()
386
+ removeAllFeaturesFromMap()
384
387
  if (isJSONValid(mStyleURL)) {
385
388
  mMap.loadStyleJson(styleURL, object : Style.OnStyleLoaded {
386
389
  override fun onStyleLoaded(style: Style) {
387
- addAllSourcesToMap()
390
+ addAllFeaturesToMap()
388
391
  }
389
392
  })
390
393
  } else {
391
394
  mMap.loadStyleUri(styleURL, object : Style.OnStyleLoaded {
392
395
  override fun onStyleLoaded(style: Style) {
393
396
  savedStyle = style
394
- addAllSourcesToMap()
395
- addQueuedFeatures()
397
+ addAllFeaturesToMap()
396
398
  }
397
399
  },
398
400
  object : OnMapLoadErrorListener {
@@ -606,17 +608,6 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
606
608
  return GeoJSONUtils.toPointFeature(latLng, properties)
607
609
  }
608
610
 
609
- fun addQueuedFeatures() {
610
- if (mQueuedFeatures != null && mQueuedFeatures!!.size > 0) {
611
- for (i in mQueuedFeatures!!.indices) {
612
- val feature = mQueuedFeatures!![i]
613
- feature.addToMap(this)
614
- mFeatures.add(feature)
615
- }
616
- mQueuedFeatures = null
617
- }
618
- }
619
-
620
611
  private fun setupLocalization(style: Style) {
621
612
  /*
622
613
  mLocalizationPlugin = new LocalizationPlugin(RCTMGLMapView.this, mMap, style);
@@ -17,6 +17,7 @@ import com.mapbox.maps.extension.style.layers.generated.SymbolLayer;
17
17
  import com.mapbox.maps.extension.style.layers.generated.HeatmapLayer;
18
18
  import com.mapbox.maps.extension.style.layers.generated.HillshadeLayer;
19
19
  import com.mapbox.maps.extension.style.atmosphere.generated.Atmosphere;
20
+ import com.mapbox.maps.extension.style.terrain.generated.Terrain;
20
21
  // import com.mapbox.maps.extension.style.layers.properties.generated.Visibility;
21
22
  import com.mapbox.maps.extension.style.layers.properties.generated.*;
22
23
  import com.mapbox.maps.extension.style.types.StyleTransition;
@@ -886,6 +887,23 @@ public class RCTMGLStyleFactory {
886
887
  }
887
888
  }
888
889
  }
890
+ public static void setTerrainLayerStyle(final Terrain layer, RCTMGLStyle style) {
891
+ List<String> styleKeys = style.getAllStyleKeys();
892
+
893
+ if (styleKeys.size() == 0) {
894
+ return;
895
+ }
896
+
897
+ for (String styleKey : styleKeys) {
898
+ final RCTMGLStyleValue styleValue = style.getStyleValueForKey(styleKey);
899
+
900
+ switch (styleKey) {
901
+ case "exaggeration":
902
+ RCTMGLStyleFactory.setExaggeration(layer, styleValue);
903
+ break;
904
+ }
905
+ }
906
+ }
889
907
 
890
908
  public static void setFillSortKey(FillLayer layer, RCTMGLStyleValue styleValue) {
891
909
  if (styleValue.isExpression()) {
@@ -2635,4 +2653,12 @@ public class RCTMGLStyleFactory {
2635
2653
  }
2636
2654
  }
2637
2655
 
2656
+ public static void setExaggeration(Terrain layer, RCTMGLStyleValue styleValue) {
2657
+ if (styleValue.isExpression()) {
2658
+ layer.exaggeration(styleValue.getExpression());
2659
+ } else {
2660
+ layer.exaggeration(styleValue.getFloat(VALUE_KEY));
2661
+ }
2662
+ }
2663
+
2638
2664
  }
@@ -0,0 +1,59 @@
1
+ package com.mapbox.rctmgl.components.styles.atmosphere
2
+
3
+ import android.content.Context
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.mapbox.maps.MapboxMap
6
+ import com.mapbox.maps.extension.style.atmosphere.generated.Atmosphere
7
+ import com.mapbox.maps.extension.style.terrain.generated.Terrain
8
+ import com.mapbox.maps.extension.style.terrain.generated.removeTerrain
9
+ import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
10
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
11
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
12
+ import com.mapbox.rctmgl.components.styles.sources.AbstractSourceConsumer
13
+ import com.mapbox.rctmgl.utils.Logger
14
+
15
+ class RCTMGLAtmosphere(context: Context?) : AbstractSourceConsumer(context) {
16
+ override var iD: String? = null
17
+ protected var mAtmosphere: Atmosphere? = null
18
+
19
+ // beginregion RCTLayer
20
+ @JvmField
21
+ protected var mMap: MapboxMap? = null
22
+
23
+ @JvmField
24
+ protected var mReactStyle: ReadableMap? = null
25
+
26
+ fun setReactStyle(reactStyle: ReadableMap?) {
27
+ mReactStyle = reactStyle
28
+ if (mAtmosphere != null) {
29
+ addStyles()
30
+ }
31
+ }
32
+ // endregion RCTLayer
33
+
34
+ override fun addToMap(mapView: RCTMGLMapView) {
35
+ mMap = mapView.getMapboxMap()
36
+ val atmosphere = makeAtmosphere()
37
+ mAtmosphere = atmosphere
38
+ addStyles()
39
+ mapView.savedStyle?.let { atmosphere.bindTo(it) }
40
+ }
41
+
42
+ override fun removeFromMap(mapView: RCTMGLMapView) {
43
+ mapView.savedStyle?.let { it.removeTerrain() }
44
+ mMap = null
45
+ }
46
+
47
+ fun makeAtmosphere(): Atmosphere {
48
+ return Atmosphere()
49
+ }
50
+
51
+ fun addStyles() {
52
+ RCTMGLStyleFactory.setAtmosphereLayerStyle(
53
+ mAtmosphere, RCTMGLStyle(
54
+ context, mReactStyle!!,
55
+ mMap!!
56
+ )
57
+ )
58
+ }
59
+ }
@@ -0,0 +1,30 @@
1
+ package com.mapbox.rctmgl.components.styles.atmosphere
2
+
3
+ import com.facebook.react.bridge.ReadableMap
4
+ import com.facebook.react.uimanager.ThemedReactContext
5
+ import com.facebook.react.uimanager.ViewGroupManager
6
+ import com.facebook.react.uimanager.annotations.ReactProp
7
+
8
+ class RCTMGLAtmosphereManager : ViewGroupManager<RCTMGLAtmosphere>() {
9
+ override fun getName(): String {
10
+ return REACT_CLASS
11
+ }
12
+
13
+ override fun createViewInstance(reactContext: ThemedReactContext): RCTMGLAtmosphere {
14
+ return RCTMGLAtmosphere(reactContext)
15
+ }
16
+
17
+ @ReactProp(name = "id")
18
+ fun setId(layer: RCTMGLAtmosphere, id: String?) {
19
+ layer.iD = id
20
+ }
21
+
22
+ @ReactProp(name = "reactStyle")
23
+ fun setReactStyle(atmosphere: RCTMGLAtmosphere, reactStyle: ReadableMap?) {
24
+ atmosphere.setReactStyle(reactStyle)
25
+ }
26
+
27
+ companion object {
28
+ const val REACT_CLASS = "RCTMGLAtmosphere"
29
+ }
30
+ }
@@ -1,58 +1,63 @@
1
1
  package com.mapbox.rctmgl.components.styles.terrain
2
2
 
3
3
  import android.content.Context
4
- import com.facebook.react.bridge.Dynamic
5
- import com.mapbox.rctmgl.components.styles.sources.AbstractSourceConsumer
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.mapbox.maps.MapboxMap
6
6
  import com.mapbox.maps.extension.style.terrain.generated.Terrain
7
+ import com.mapbox.maps.extension.style.terrain.generated.removeTerrain
7
8
  import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
8
- import com.facebook.react.bridge.ReadableType
9
- import com.mapbox.rctmgl.utils.ExpressionParser
9
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyle
10
+ import com.mapbox.rctmgl.components.styles.RCTMGLStyleFactory
11
+ import com.mapbox.rctmgl.components.styles.sources.AbstractSourceConsumer
10
12
  import com.mapbox.rctmgl.utils.Logger
11
13
 
12
14
  class RCTMGLTerrain(context: Context?) : AbstractSourceConsumer(context) {
13
15
  override var iD: String? = null
14
16
  protected var mSourceID: String? = null
15
- protected var mExaggeration: Dynamic? = null
16
17
  protected var mTerrain: Terrain? = null
17
18
 
19
+ // beginregion RCTLayer
20
+ @JvmField
21
+ protected var mMap: MapboxMap? = null
22
+
23
+ @JvmField
24
+ protected var mReactStyle: ReadableMap? = null
25
+
26
+ fun setReactStyle(reactStyle: ReadableMap?) {
27
+ mReactStyle = reactStyle
28
+ if (mTerrain != null) {
29
+ addStyles()
30
+ }
31
+ }
32
+ // endregion RCTLayer
33
+
18
34
  fun setSourceID(sourceID: String?) {
19
35
  mSourceID = sourceID
20
36
  }
21
37
 
22
38
  override fun addToMap(mapView: RCTMGLMapView) {
39
+ mMap = mapView.getMapboxMap()
23
40
  val terrain = makeTerrain()
24
- addStyles(terrain)
25
41
  mTerrain = terrain
26
- mapView.savedStyle?.let { mTerrain!!.bindTo(it) }
42
+ addStyles()
43
+ mapView.savedStyle?.let { terrain.bindTo(it) }
27
44
  }
28
45
 
29
46
  override fun removeFromMap(mapView: RCTMGLMapView) {
30
- val emptyTerrain = Terrain("no-such-source-empty")
31
- mapView.savedStyle?.let { emptyTerrain.bindTo(it) }
47
+ mapView.savedStyle?.let { it.removeTerrain() }
48
+ mMap = null
32
49
  }
33
50
 
34
51
  fun makeTerrain(): Terrain {
35
52
  return Terrain(mSourceID!!)
36
53
  }
37
54
 
38
- fun setExaggeration(exaggeration: Dynamic?) {
39
- mExaggeration = exaggeration
40
- }
41
-
42
- fun addStyles(terrain: Terrain) {
43
- when (mExaggeration!!.type) {
44
- ReadableType.Number -> terrain.exaggeration(mExaggeration!!.asDouble())
45
- ReadableType.Array -> terrain.exaggeration(
46
- ExpressionParser.from(mExaggeration!!.asArray())!!
47
- )
48
- else -> Logger.e(
49
- "RCTMGLTerrain",
50
- "Unexpected type passed to exaggeration:$mExaggeration"
55
+ fun addStyles() {
56
+ RCTMGLStyleFactory.setTerrainLayerStyle(
57
+ mTerrain, RCTMGLStyle(
58
+ context, mReactStyle!!,
59
+ mMap!!
51
60
  )
52
- }
53
- }
54
-
55
- fun setSourceLayerID(sourceLayerID: String?) {
56
- Logger.e("RCTMGLSkyLayer", "Source layer should not be set for source layer id")
61
+ )
57
62
  }
58
63
  }
@@ -1,14 +1,8 @@
1
1
  package com.mapbox.rctmgl.components.styles.terrain
2
2
 
3
- import com.facebook.react.bridge.Dynamic
4
- import com.mapbox.rctmgl.components.styles.sources.AbstractSourceConsumer
5
- import com.mapbox.maps.extension.style.terrain.generated.Terrain
6
- import com.mapbox.rctmgl.components.mapview.RCTMGLMapView
7
- import com.facebook.react.bridge.ReadableType
8
- import com.facebook.react.uimanager.ViewGroupManager
9
- import com.mapbox.rctmgl.components.styles.terrain.RCTMGLTerrain
10
- import com.mapbox.rctmgl.components.styles.terrain.RCTMGLTerrainManager
3
+ import com.facebook.react.bridge.ReadableMap
11
4
  import com.facebook.react.uimanager.ThemedReactContext
5
+ import com.facebook.react.uimanager.ViewGroupManager
12
6
  import com.facebook.react.uimanager.annotations.ReactProp
13
7
 
14
8
  class RCTMGLTerrainManager : ViewGroupManager<RCTMGLTerrain>() {
@@ -30,9 +24,9 @@ class RCTMGLTerrainManager : ViewGroupManager<RCTMGLTerrain>() {
30
24
  layer.setSourceID(sourceID)
31
25
  }
32
26
 
33
- @ReactProp(name = "exaggeration")
34
- fun setExaggeration(layer: RCTMGLTerrain, exaggeration: Dynamic?) {
35
- layer.setExaggeration(exaggeration)
27
+ @ReactProp(name = "reactStyle")
28
+ fun setReactStyle(terrain: RCTMGLTerrain, reactStyle: ReadableMap?) {
29
+ terrain.setReactStyle(reactStyle)
36
30
  }
37
31
 
38
32
  companion object {
@@ -5,11 +5,12 @@ Comparsion of various annotations available in React native mapbox:
5
5
  | *Feature* | *SymbolLayer* | *PointAnnotation* |*MarkerView* |*CircleLayer* |
6
6
  |------------------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------|-------------------------|---------------------|
7
7
  | Can use images | &check; | | | |
8
- | RN Views as children | iOS: static | iOS: interactive <br/> Android: static |interactive | |
9
- | Interactions | click | iOS: full <br/> Android: click & drag & callout | supports full interactivity in the sense that inside MarkerViews one can place any RN View, which can be interacted with. Not to be misunderstood with drag n drop interactivity. | click |
10
- | Control Z-index | &check; | iOS: always on top, Android: n/a |always on top | &check; |
8
+ | RN Views as children | iOS: static | static in v10, *was interactive on iOS before v10* |interactive | |
9
+ | Interactions | click | click & drag & callout | supports full interactivity in the sense that inside MarkerViews one can place any RN View, which can be interacted with. Not to be misunderstood with drag n drop interactivity. | click |
10
+ | Control Z-index | &check; | n/a |always on top | &check; |
11
11
  | Clustering | &check; | | | &check; |
12
12
  | Style with expressions | &check; | | | &check; |
13
+ | v10 implementation | [SymbolLayer](https://docs.mapbox.com/ios/maps/api/10.8.1/Structs/SymbolLayer.html) | [PointAnnotation](https://docs.mapbox.com/ios/maps/api/10.8.1/Classes/PointAnnotationManager.html) |[ViewAnnotations](https://docs.mapbox.com/ios/maps/api/10.8.1/Classes/ViewAnnotationManager.html) |[CircleLayer](https://docs.mapbox.com/ios/maps/api/10.8.1/Structs/CircleLayer.html) |
13
14
  | iOS implementation | [MGLStyleSymbolLayer](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLSymbolStyleLayer.html) | [MGLAnnotationView](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLAnnotationView.html) |[MGLAnnotationView](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLAnnotationView.html) |[MGLCircleStyleLayer](https://docs.mapbox.com/ios/api/maps/5.8.0/Classes/MGLCircleStyleLayer.html) |
14
15
  | Android implementation | [SymbolLayer](https://docs.mapbox.com/android/api/map-sdk/9.0.0/com/mapbox/mapboxsdk/style/layers/SymbolLayer.html)| [annotation.Symbol](https://docs.mapbox.com/android/api/plugins/annotation/0.8.0/com/mapbox/mapboxsdk/plugins/annotation/Symbol.html) |[annotation.Marker](https://docs.mapbox.com/android/api/plugins/markerview/0.4.0/com/mapbox/mapboxsdk/plugins/markerview/MarkerView.html) |[CircleLayer](https://docs.mapbox.com/android/api/map-sdk/9.0.0/com/mapbox/mapboxsdk/style/layers/CircleLayer.html)|
15
16
 
package/docs/Camera.md CHANGED
@@ -60,7 +60,7 @@ return (
60
60
  | &nbsp;&nbsp;animationMode | `union` | `none` | `false` | The easing or path the camera uses to animate to a new configuration. |
61
61
  | allowUpdates | `boolean` | `none` | `false` | Whether the camera should send any configuration to the native module. Prevents unnecessary tile<br/>fetching and improves performance when the map is not visible. Defaults to `true`. |
62
62
  | triggerKey | `string \| number` | `none` | `false` | Any arbitrary primitive value that, when changed, causes the camera to retry moving to its target<br/>configuration. (Not yet implemented.) |
63
- | onUserTrackingModeChange | `UserTrackingModeChangeCallback` | `none` | `false` | Executes when user tracking mode changes. |
63
+ | onUserTrackingModeChange | `func` | `none` | `false` | Executes when user tracking mode changes.<br/>*signature:*`(event:MapboxGLEvent) => void` |
64
64
 
65
65
  ## methods
66
66
  ### setCamera()
@@ -1,4 +1,4 @@
1
- <!-- This file was autogenerated from HeadingIndicator.js do not modify -->
1
+ <!-- This file was autogenerated from HeadingIndicator.tsx do not modify -->
2
2
  # <MapboxGL.HeadingIndicator />
3
3
 
4
4
 
package/docs/MapView.md CHANGED
@@ -33,8 +33,8 @@ MapView backed by Mapbox Native GL
33
33
  | onRegionWillChange | `func` | `none` | `false` | <v10 only<br/><br/>This event is triggered whenever the currently displayed map region is about to change. |
34
34
  | onRegionIsChanging | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is changing. |
35
35
  | onRegionDidChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region finished changing. |
36
- | onCameraChanged | `func` | `none` | `false` | iOS, v10 only, experimental.<br/><br/>Called when the currently displayed map area changes.<br/>Replaces onRegionIsChanging, so can't set both |
37
- | onMapIdle | `func` | `none` | `false` | iOS, v10 only, experimental<br/><br/>Called when the currently displayed map area stops changing.<br/>Replaces onRegionDidChange, so can't set both |
36
+ | onCameraChanged | `func` | `none` | `false` | iOS, v10 only, deprecated will be removed in next version - please use onRegionIsChanging. |
37
+ | onMapIdle | `func` | `none` | `false` | iOS, v10 only, deprecated will be removed in next version - please use onRegionDidChange |
38
38
  | onWillStartLoadingMap | `func` | `none` | `false` | This event is triggered when the map is about to start loading a new map style. |
39
39
  | onDidFinishLoadingMap | `func` | `none` | `false` | This is triggered when the map has successfully loaded a new map style. |
40
40
  | onDidFailLoadingMap | `func` | `none` | `false` | This event is triggered when the map has failed to load a new map style. |
@@ -1,4 +1,4 @@
1
- <!-- This file was autogenerated from SymbolLayer.js do not modify -->
1
+ <!-- This file was autogenerated from SymbolLayer.tsx do not modify -->
2
2
  # <MapboxGL.SymbolLayer />
3
3
  SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map.
4
4
 
@@ -11,10 +11,11 @@ SymbolLayer is a style layer that renders icon and text labels at points or alon
11
11
  | aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |
12
12
  | belowLayerID | `string` | `none` | `false` | Inserts a layer below belowLayerID |
13
13
  | layerIndex | `number` | `none` | `false` | Inserts a layer at a specified index |
14
- | filter | `array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
14
+ | filter | `Array` | `none` | `false` | Filter only the features in the source layer that satisfy a condition that you define |
15
15
  | minZoomLevel | `number` | `none` | `false` | The minimum zoom level at which the layer gets parsed and appears. |
16
16
  | maxZoomLevel | `number` | `none` | `false` | The maximum zoom level at which the layer gets parsed and appears. |
17
- | style | `union` | `none` | `false` | Customizable style attributes |
17
+ | style | `SymbolLayerStyleProps` | `none` | `true` | FIX ME NO DESCRIPTION |
18
+ | children | `JSX.Element \| JSX.Element[]` | `none` | `false` | FIX ME NO DESCRIPTION |
18
19
 
19
20
 
20
21
  ## styles
package/docs/Terrain.md CHANGED
@@ -1,22 +1,77 @@
1
- <!-- This file was autogenerated from Terrain.js do not modify -->
1
+ <!-- This file was autogenerated from Terrain.tsx do not modify -->
2
2
  # <MapboxGL.Terrain />
3
- A global modifier that elevates layers and markers based on a DEM data source.
3
+
4
4
 
5
5
  ## props
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :-- | :----- | :------ | :---------- |
8
- | sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | Name of a source of raster_dem type to be used for terrain elevation. |
9
- | exaggeration | `union` | `none` | `false` | Optional number between 0 and 1000 inclusive. Defaults to 1. Supports interpolateexpressions. Transitionable.<br/>Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value. |
8
+ | sourceID | `string` | `none` | `true` | Name of a source of raster_dem type to be used for terrain elevation. |
9
+ | exaggeration | `Value` | `none` | `false` | Deprecated, use exaggeration in style instead |
10
+ | style | `TerrainLayerStyleProps` | `none` | `true` | Customizable style attributes |
11
+
12
+
13
+ ## styles
14
+
15
+ * <a href="#source">source</a><br/>
16
+ * <a href="#exaggeration">exaggeration</a><br/>
17
+
18
+ ___
19
+
20
+ ### source
21
+ Name: `source`
22
+
23
+ ### Description
24
+ Name of a source of `raster_dem` type to be used for terrain elevation.
25
+
26
+ ### Type
27
+ `string`
28
+
29
+
30
+
31
+ ___
32
+
33
+ ### exaggeration
34
+ Name: `exaggeration`
35
+
36
+ ### Description
37
+ Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.
38
+
39
+ ### Type
40
+ `number`
41
+ ### Default Value
42
+ `1`
43
+
44
+ ### Minimum
45
+ `0`
46
+
47
+
48
+ ### Maximum
49
+ `1000`
50
+
51
+ ### Requires
52
+ `source`
53
+
54
+ ### Expression
55
+
56
+ Parameters: `zoom`
57
+ ___
58
+
59
+ ### Name
60
+
61
+ `exaggerationTransition`
10
62
 
11
- ## methods
12
- ### baseProps()
63
+ ### Description
13
64
 
65
+ The transition affecting any changes to this layer’s exaggeration property.
14
66
 
67
+ ### Type
15
68
 
16
- #### arguments
17
- | Name | Type | Required | Description |
18
- | ---- | :--: | :------: | :----------: |
69
+ `{ duration, delay }`
19
70
 
71
+ ### Units
72
+ `milliseconds`
20
73
 
74
+ ### Default Value
75
+ `{duration: 300, delay: 0}`
21
76
 
22
77