@rnmapbox/maps 10.0.0-beta.48 → 10.0.0-beta.49

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.
@@ -130,8 +130,8 @@ dependencies {
130
130
  implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
131
131
  }
132
132
  else if (safeExtGet("RNMapboxMapsImpl", defaultMapboxMapsImpl) == "mapbox") {
133
- implementation 'com.mapbox.maps:android:10.8.0'
134
- implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.4.0'
133
+ implementation 'com.mapbox.maps:android:10.9.0'
134
+ implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.8.0'
135
135
  }
136
136
  }
137
137
 
@@ -23,7 +23,10 @@ import com.mapbox.maps.extension.style.expressions.generated.Expression
23
23
  import com.mapbox.maps.extension.style.layers.Layer
24
24
  import com.mapbox.maps.extension.style.layers.generated.*
25
25
  import com.mapbox.maps.extension.style.layers.getLayer
26
+ import com.mapbox.maps.extension.style.layers.properties.generated.ProjectionName
26
27
  import com.mapbox.maps.extension.style.layers.properties.generated.Visibility
28
+ import com.mapbox.maps.extension.style.projection.generated.Projection
29
+ import com.mapbox.maps.extension.style.projection.generated.setProjection
27
30
  import com.mapbox.maps.plugin.annotation.Annotation
28
31
  import com.mapbox.maps.plugin.annotation.annotations
29
32
  import com.mapbox.maps.plugin.annotation.generated.*
@@ -89,6 +92,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
89
92
  private val mImages: MutableList<RCTMGLImages>
90
93
  private var mPointAnnotationManager: PointAnnotationManager? = null
91
94
  private var mActiveMarkerID: Long = -1
95
+ private var mProjection: ProjectionName = ProjectionName.MERCATOR
92
96
  private var mStyleURL: String? = null
93
97
  val isDestroyed = false
94
98
  private var mCamera: RCTMGLCamera? = null
@@ -394,6 +398,16 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
394
398
  return true
395
399
  }
396
400
 
401
+ fun setReactProjection(projection: ProjectionName) {
402
+ if (projection != null) {
403
+ mProjection = projection
404
+ }
405
+
406
+ if (mMap != null) {
407
+ mMap.getStyle()?.setProjection(Projection(projection))
408
+ }
409
+ }
410
+
397
411
  fun setReactStyleURL(styleURL: String) {
398
412
  mStyleURL = styleURL
399
413
  if (mMap != null) {
@@ -401,6 +415,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
401
415
  if (isJSONValid(mStyleURL)) {
402
416
  mMap.loadStyleJson(styleURL, object : Style.OnStyleLoaded {
403
417
  override fun onStyleLoaded(style: Style) {
418
+ style.setProjection(Projection(mProjection))
404
419
  addAllFeaturesToMap()
405
420
  }
406
421
  })
@@ -408,6 +423,7 @@ open class RCTMGLMapView(private val mContext: Context, var mManager: RCTMGLMapV
408
423
  mMap.loadStyleUri(styleURL, object : Style.OnStyleLoaded {
409
424
  override fun onStyleLoaded(style: Style) {
410
425
  savedStyle = style
426
+ style.setProjection(Projection(mProjection))
411
427
  addAllFeaturesToMap()
412
428
  }
413
429
  },
@@ -11,6 +11,7 @@ import com.facebook.react.uimanager.annotations.ReactProp
11
11
  import com.mapbox.rctmgl.events.constants.EventKeys
12
12
  import com.mapbox.maps.MapboxMap
13
13
  import com.facebook.react.common.MapBuilder
14
+ import com.mapbox.maps.extension.style.layers.properties.generated.ProjectionName
14
15
  import com.mapbox.maps.plugin.compass.compass
15
16
  import com.mapbox.maps.plugin.gestures.gestures
16
17
  import com.mapbox.maps.plugin.logo.logo
@@ -78,7 +79,12 @@ open class RCTMGLMapViewManager(context: ReactApplicationContext?) :
78
79
  return mViews[reactTag]
79
80
  }
80
81
 
81
- //region React Props
82
+ // region React Props
83
+ @ReactProp(name = "projection")
84
+ fun setProjection(mapView: RCTMGLMapView, projection: String?) {
85
+ mapView.setReactProjection( if (projection == "globe") ProjectionName.GLOBE else ProjectionName.MERCATOR )
86
+ }
87
+
82
88
  @ReactProp(name = "styleURL")
83
89
  fun setStyleURL(mapView: RCTMGLMapView, styleURL: String?) {
84
90
  mapView.setReactStyleURL(styleURL!!)
@@ -594,18 +594,6 @@ public class RCTMGLStyleFactory {
594
594
  case "fillExtrusionVerticalGradient":
595
595
  RCTMGLStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue);
596
596
  break;
597
- case "fillExtrusionAmbientOcclusionIntensity":
598
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionIntensity(layer, styleValue);
599
- break;
600
- case "fillExtrusionAmbientOcclusionIntensityTransition":
601
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionIntensityTransition(layer, styleValue);
602
- break;
603
- case "fillExtrusionAmbientOcclusionRadius":
604
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionRadius(layer, styleValue);
605
- break;
606
- case "fillExtrusionAmbientOcclusionRadiusTransition":
607
- RCTMGLStyleFactory.setFillExtrusionAmbientOcclusionRadiusTransition(layer, styleValue);
608
- break;
609
597
  }
610
598
  }
611
599
  }
@@ -2129,38 +2117,6 @@ public class RCTMGLStyleFactory {
2129
2117
  }
2130
2118
  }
2131
2119
 
2132
- public static void setFillExtrusionAmbientOcclusionIntensity(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2133
- if (styleValue.isExpression()) {
2134
- layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getExpression());
2135
- } else {
2136
- layer.fillExtrusionAmbientOcclusionIntensity(styleValue.getFloat(VALUE_KEY));
2137
- }
2138
- }
2139
-
2140
-
2141
- public static void setFillExtrusionAmbientOcclusionIntensityTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2142
- StyleTransition transition = styleValue.getTransition();
2143
- if (transition != null) {
2144
- layer.fillExtrusionAmbientOcclusionIntensityTransition(transition);
2145
- }
2146
- }
2147
-
2148
- public static void setFillExtrusionAmbientOcclusionRadius(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2149
- if (styleValue.isExpression()) {
2150
- layer.fillExtrusionAmbientOcclusionRadius(styleValue.getExpression());
2151
- } else {
2152
- layer.fillExtrusionAmbientOcclusionRadius(styleValue.getFloat(VALUE_KEY));
2153
- }
2154
- }
2155
-
2156
-
2157
- public static void setFillExtrusionAmbientOcclusionRadiusTransition(FillExtrusionLayer layer, RCTMGLStyleValue styleValue) {
2158
- StyleTransition transition = styleValue.getTransition();
2159
- if (transition != null) {
2160
- layer.fillExtrusionAmbientOcclusionRadiusTransition(transition);
2161
- }
2162
- }
2163
-
2164
2120
  public static void setVisibility(RasterLayer layer, RCTMGLStyleValue styleValue) {
2165
2121
  layer.visibility(Visibility.valueOf(styleValue.getEnumName()));
2166
2122
  }
@@ -28,8 +28,6 @@ FillExtrusionLayer is a style layer that renders one or more 3D extruded polygon
28
28
  * <a href="#fillextrusionheight">fillExtrusionHeight</a><br/>
29
29
  * <a href="#fillextrusionbase">fillExtrusionBase</a><br/>
30
30
  * <a href="#fillextrusionverticalgradient">fillExtrusionVerticalGradient</a><br/>
31
- * <a href="#fillextrusionambientocclusionintensity">fillExtrusionAmbientOcclusionIntensity</a><br/>
32
- * <a href="#fillextrusionambientocclusionradius">fillExtrusionAmbientOcclusionRadius</a><br/>
33
31
 
34
32
  ___
35
33
 
@@ -346,88 +344,3 @@ Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If t
346
344
 
347
345
  Parameters: `zoom`
348
346
 
349
- ___
350
-
351
- ### fillExtrusionAmbientOcclusionIntensity
352
- Name: `fillExtrusionAmbientOcclusionIntensity`
353
-
354
- ### Description
355
- Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
356
-
357
- ### Type
358
- `number`
359
- ### Default Value
360
- `0`
361
-
362
- ### Minimum
363
- `0`
364
-
365
-
366
- ### Maximum
367
- `1`
368
-
369
- ### Expression
370
-
371
- Parameters: `zoom`
372
- ___
373
-
374
- ### Name
375
-
376
- `fillExtrusionAmbientOcclusionIntensityTransition`
377
-
378
- ### Description
379
-
380
- The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionIntensity property.
381
-
382
- ### Type
383
-
384
- `{ duration, delay }`
385
-
386
- ### Units
387
- `milliseconds`
388
-
389
- ### Default Value
390
- `{duration: 300, delay: 0}`
391
-
392
-
393
- ___
394
-
395
- ### fillExtrusionAmbientOcclusionRadius
396
- Name: `fillExtrusionAmbientOcclusionRadius`
397
-
398
- ### Description
399
- The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.
400
-
401
- ### Type
402
- `number`
403
- ### Default Value
404
- `3`
405
-
406
- ### Minimum
407
- `0`
408
-
409
-
410
- ### Expression
411
-
412
- Parameters: `zoom`
413
- ___
414
-
415
- ### Name
416
-
417
- `fillExtrusionAmbientOcclusionRadiusTransition`
418
-
419
- ### Description
420
-
421
- The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionRadius property.
422
-
423
- ### Type
424
-
425
- `{ duration, delay }`
426
-
427
- ### Units
428
- `milliseconds`
429
-
430
- ### Default Value
431
- `{duration: 300, delay: 0}`
432
-
433
-
package/docs/MapView.md CHANGED
@@ -6,6 +6,7 @@ MapView backed by Mapbox Native GL
6
6
  | Prop | Type | Default | Required | Description |
7
7
  | ---- | :-- | :----- | :------ | :---------- |
8
8
  | contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
9
+ | projection | `enum` | `'mercator'` | `false` | The projection used when rendering the map |
9
10
  | style | `any` | `none` | `false` | Style for wrapping React Native View |
10
11
  | styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street` |
11
12
  | styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec |
package/docs/docs.json CHANGED
@@ -1425,43 +1425,6 @@
1425
1425
  ]
1426
1426
  },
1427
1427
  "transition": false
1428
- },
1429
- {
1430
- "name": "fillExtrusionAmbientOcclusionIntensity",
1431
- "type": "number",
1432
- "values": [],
1433
- "minimum": 0,
1434
- "maximum": 1,
1435
- "default": 0,
1436
- "description": "Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
1437
- "requires": [],
1438
- "disabledBy": [],
1439
- "allowedFunctionTypes": [],
1440
- "expression": {
1441
- "interpolated": true,
1442
- "parameters": [
1443
- "zoom"
1444
- ]
1445
- },
1446
- "transition": true
1447
- },
1448
- {
1449
- "name": "fillExtrusionAmbientOcclusionRadius",
1450
- "type": "number",
1451
- "values": [],
1452
- "minimum": 0,
1453
- "default": 3,
1454
- "description": "The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.",
1455
- "requires": [],
1456
- "disabledBy": [],
1457
- "allowedFunctionTypes": [],
1458
- "expression": {
1459
- "interpolated": true,
1460
- "parameters": [
1461
- "zoom"
1462
- ]
1463
- },
1464
- "transition": true
1465
1428
  }
1466
1429
  ]
1467
1430
  },
@@ -2928,6 +2891,13 @@
2928
2891
  "default": "none",
2929
2892
  "description": "The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport."
2930
2893
  },
2894
+ {
2895
+ "name": "projection",
2896
+ "required": false,
2897
+ "type": "enum",
2898
+ "default": "'mercator'",
2899
+ "description": "The projection used when rendering the map"
2900
+ },
2931
2901
  {
2932
2902
  "name": "style",
2933
2903
  "required": false,
package/index.d.ts CHANGED
@@ -526,6 +526,7 @@ export interface MapViewProps extends ViewProps {
526
526
  userTrackingMode?: MapboxGL.UserTrackingModes;
527
527
  userLocationVerticalAlignment?: number;
528
528
  contentInset?: Array<number>;
529
+ projection?: 'mercator' | 'globe';
529
530
  style?: StyleProp<ViewStyle>;
530
531
  styleURL?: string;
531
532
  styleJSON?: string;
@@ -135,6 +135,14 @@ open class RCTMGLMapView : MapView {
135
135
 
136
136
 
137
137
  // MARK: - React Native properties
138
+
139
+ @objc func setReactProjection(_ value: String?) {
140
+ if let value = value {
141
+ var projection = StyleProjection(name: value == "globe" ? .globe : .mercator)
142
+ try! self.mapboxMap.style.setProjection(projection)
143
+ }
144
+ }
145
+
138
146
 
139
147
  @objc func setReactAttributionEnabled(_ value: Bool) {
140
148
  mapView.ornaments.options.attributionButton.visibility = value ? .visible : .hidden
@@ -21,6 +21,7 @@ RCT_REMAP_VIEW_PROPERTY(scrollEnabled, reactScrollEnabled, BOOL)
21
21
  RCT_REMAP_VIEW_PROPERTY(rotateEnabled, reactRotateEnabled, BOOL)
22
22
  RCT_REMAP_VIEW_PROPERTY(pitchEnabled, reactPitchEnabled, BOOL)
23
23
 
24
+ RCT_REMAP_VIEW_PROPERTY(projection, reactProjection, NSString)
24
25
 
25
26
  RCT_REMAP_VIEW_PROPERTY(styleURL, reactStyleURL, NSString)
26
27
  RCT_REMAP_VIEW_PROPERTY(onPress, reactOnPress, RCTBubblingEventBlock)
@@ -516,14 +516,6 @@ func fillExtrusionLayer(layer: inout FillExtrusionLayer, reactStyle:Dictionary<S
516
516
  self.setFillExtrusionBaseTransition(&layer, styleValue:styleValue);
517
517
  } else if (prop == "fillExtrusionVerticalGradient") {
518
518
  self.setFillExtrusionVerticalGradient(&layer, styleValue:styleValue);
519
- } else if (prop == "fillExtrusionAmbientOcclusionIntensity") {
520
- self.setFillExtrusionAmbientOcclusionIntensity(&layer, styleValue:styleValue);
521
- } else if (prop == "fillExtrusionAmbientOcclusionIntensityTransition") {
522
- self.setFillExtrusionAmbientOcclusionIntensityTransition(&layer, styleValue:styleValue);
523
- } else if (prop == "fillExtrusionAmbientOcclusionRadius") {
524
- self.setFillExtrusionAmbientOcclusionRadius(&layer, styleValue:styleValue);
525
- } else if (prop == "fillExtrusionAmbientOcclusionRadiusTransition") {
526
- self.setFillExtrusionAmbientOcclusionRadiusTransition(&layer, styleValue:styleValue);
527
519
  } else {
528
520
  Logger.log(level:.error, message: "Unexpected property \(prop) for layer: fill-extrusion")
529
521
  }
@@ -2027,34 +2019,6 @@ func setFillExtrusionVerticalGradient(_ layer: inout FillExtrusionLayer, styleVa
2027
2019
 
2028
2020
  }
2029
2021
 
2030
- func setFillExtrusionAmbientOcclusionIntensity(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2031
- {
2032
-
2033
-
2034
- layer.fillExtrusionAmbientOcclusionIntensity = styleValue.mglStyleValueNumber();
2035
-
2036
-
2037
- }
2038
-
2039
- func setFillExtrusionAmbientOcclusionIntensityTransition(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2040
- {
2041
- layer.fillExtrusionAmbientOcclusionIntensityTransition = styleValue.getTransition();
2042
- }
2043
-
2044
- func setFillExtrusionAmbientOcclusionRadius(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2045
- {
2046
-
2047
-
2048
- layer.fillExtrusionAmbientOcclusionRadius = styleValue.mglStyleValueNumber();
2049
-
2050
-
2051
- }
2052
-
2053
- func setFillExtrusionAmbientOcclusionRadiusTransition(_ layer: inout FillExtrusionLayer, styleValue: RCTMGLStyleValue)
2054
- {
2055
- layer.fillExtrusionAmbientOcclusionRadiusTransition = styleValue.getTransition();
2056
- }
2057
-
2058
2022
 
2059
2023
 
2060
2024
  func setRasterStyleLayerVisibility(_ layer: inout RasterLayer, styleValue: RCTMGLStyleValue)
@@ -57,6 +57,11 @@ class MapView extends NativeBridgeComponent(
57
57
  PropTypes.number,
58
58
  ]),
59
59
 
60
+ /**
61
+ * The projection used when rendering the map
62
+ */
63
+ projection: PropTypes.oneOf(['mercator', 'globe']),
64
+
60
65
  /**
61
66
  * Style for wrapping React Native View
62
67
  */
@@ -294,6 +299,7 @@ class MapView extends NativeBridgeComponent(
294
299
  };
295
300
 
296
301
  static defaultProps = {
302
+ projection: 'mercator',
297
303
  localizeLabels: false,
298
304
  scrollEnabled: true,
299
305
  pitchEnabled: true,
@@ -391,21 +397,27 @@ class MapView extends NativeBridgeComponent(
391
397
  );
392
398
  if (props.onRegionDidChange) {
393
399
  console.warn(
394
- 'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
400
+ 'rnmapbox/maps: only one of MapView.onRegionDidChange or onMapIdle is supported',
395
401
  );
396
402
  }
397
403
  }
398
404
  if (addIfHasHandler('CameraChanged')) {
399
405
  console.warn(
400
- 'onCameraChanged is deprecated and will be removed in next beta - please use onRegionWillChange',
406
+ 'onCameraChanged is deprecated and will be removed in next beta - please use onRegionIsChanging',
401
407
  );
402
- if (props.onRegionWillChange) {
408
+ if (props.onRegionIsChanging) {
403
409
  console.warn(
404
- 'rnmapbox/maps: only one of MapView.onRegionWillChange or onCameraChanged is supported',
410
+ 'rnmapbox/maps: only one of MapView.onRegionIsChanging or onCameraChanged is supported',
405
411
  );
406
412
  }
407
413
  }
408
414
 
415
+ if (props.onRegionWillChange) {
416
+ console.warn(
417
+ 'onRegionWillChange is deprecated and will be removed in v10 - please use onRegionIsChanging',
418
+ );
419
+ }
420
+
409
421
  this._runNativeCommand('setHandledMapChangedEvents', this._nativeRef, [
410
422
  events,
411
423
  ]);
@@ -82,12 +82,12 @@ export class SymbolLayer extends AbstractLayer<Props, NativeTypeProps> {
82
82
  _shouldSnapshot() {
83
83
  let isSnapshot = false;
84
84
 
85
- if (React.Children.count(this.props.children) <= 0) {
85
+ if (React.Children.count(this.baseProps.children) <= 0) {
86
86
  return isSnapshot;
87
87
  }
88
88
 
89
- React.Children.forEach(this.props.children, (child) => {
90
- if (child !== undefined && 'type' in child && child.type === View) {
89
+ React.Children.forEach(this.baseProps.children, (child) => {
90
+ if (child?.type === View) {
91
91
  isSnapshot = true;
92
92
  }
93
93
  });
@@ -1258,24 +1258,6 @@ export interface FillExtrusionLayerStyleProps {
1258
1258
  * Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
1259
1259
  */
1260
1260
  fillExtrusionVerticalGradient?: Value<boolean, ['zoom']>;
1261
- /**
1262
- * Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
1263
- */
1264
- fillExtrusionAmbientOcclusionIntensity?: Value<number, ['zoom']>;
1265
-
1266
- /**
1267
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionIntensity property.
1268
- */
1269
- fillExtrusionAmbientOcclusionIntensityTransition?: Transition;
1270
- /**
1271
- * The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.
1272
- */
1273
- fillExtrusionAmbientOcclusionRadius?: Value<number, ['zoom']>;
1274
-
1275
- /**
1276
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionRadius property.
1277
- */
1278
- fillExtrusionAmbientOcclusionRadiusTransition?: Transition;
1279
1261
  }
1280
1262
  export interface RasterLayerStyleProps {
1281
1263
  /**
@@ -1196,38 +1196,6 @@ export const FillExtrusionLayerStyleProp = PropTypes.shape({
1196
1196
  PropTypes.bool,
1197
1197
  PropTypes.array,
1198
1198
  ]),
1199
-
1200
- /**
1201
- * Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
1202
- */
1203
- fillExtrusionAmbientOcclusionIntensity: PropTypes.oneOfType([
1204
- PropTypes.number,
1205
- PropTypes.array,
1206
- ]),
1207
-
1208
- /**
1209
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionIntensity property.
1210
- */
1211
- fillExtrusionAmbientOcclusionIntensityTransition: PropTypes.shape({
1212
- duration: PropTypes.number,
1213
- delay: PropTypes.number,
1214
- }),
1215
-
1216
- /**
1217
- * The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a lowCost bestEffort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.
1218
- */
1219
- fillExtrusionAmbientOcclusionRadius: PropTypes.oneOfType([
1220
- PropTypes.number,
1221
- PropTypes.array,
1222
- ]),
1223
-
1224
- /**
1225
- * The transition affecting any changes to this layer’s fillExtrusionAmbientOcclusionRadius property.
1226
- */
1227
- fillExtrusionAmbientOcclusionRadiusTransition: PropTypes.shape({
1228
- duration: PropTypes.number,
1229
- delay: PropTypes.number,
1230
- }),
1231
1199
  });
1232
1200
 
1233
1201
  export const RasterLayerStyleProp = PropTypes.shape({
@@ -1847,10 +1815,6 @@ const styleMap = {
1847
1815
  fillExtrusionBase: StyleTypes.Constant,
1848
1816
  fillExtrusionBaseTransition: StyleTypes.Transition,
1849
1817
  fillExtrusionVerticalGradient: StyleTypes.Constant,
1850
- fillExtrusionAmbientOcclusionIntensity: StyleTypes.Constant,
1851
- fillExtrusionAmbientOcclusionIntensityTransition: StyleTypes.Transition,
1852
- fillExtrusionAmbientOcclusionRadius: StyleTypes.Constant,
1853
- fillExtrusionAmbientOcclusionRadiusTransition: StyleTypes.Transition,
1854
1818
 
1855
1819
  rasterOpacity: StyleTypes.Constant,
1856
1820
  rasterOpacityTransition: StyleTypes.Transition,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.0.0-beta.48",
4
+ "version": "10.0.0-beta.49",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/plugin/install.md CHANGED
@@ -32,8 +32,6 @@ After installing this package, add the [config plugin](https://docs.expo.io/guid
32
32
  }
33
33
  ```
34
34
 
35
- Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.io/workflow/customizing/) guide.
36
-
37
35
  For `mapbox` or `mapbox-gl` you'll need to provide `RNMapboxMapsDownloadToken` as well.
38
36
 
39
37
  ```json
@@ -52,6 +50,8 @@ For `mapbox` or `mapbox-gl` you'll need to provide `RNMapboxMapsDownloadToken` a
52
50
  }
53
51
  ```
54
52
 
53
+ Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.io/workflow/customizing/) guide.
54
+
55
55
  ## Manual Setup
56
56
 
57
57
  For bare workflow projects, you can follow the manual setup guides:
@@ -20,7 +20,7 @@ require 'json'
20
20
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
21
21
 
22
22
  ## Warning: these lines are scanned by autogenerate.js
23
- rnMapboxMapsDefaultMapboxVersion = '~> 10.8.1'
23
+ rnMapboxMapsDefaultMapboxVersion = '~> 10.9.0'
24
24
  rnMapboxMapsDefaultMapboxGLVersion = '~> 5.9.0'
25
25
  rnMapboxMapsDefaultMapLibreVersion = 'exactVersion 5.12.1'
26
26
 
@@ -348,6 +348,9 @@ function isTranslate(attrName) {
348
348
 
349
349
  function isAttrSupported(attr, only) {
350
350
  const support = getAttributeSupport(attr['sdk-support']);
351
+ if (attr.private === true) {
352
+ return false;
353
+ }
351
354
  if (only != null) {
352
355
  return support.basic[only].android && support.basic[only].ios;
353
356
  }
@@ -196,7 +196,7 @@
196
196
  },
197
197
  "promoteId": {
198
198
  "type": "promoteId",
199
- "doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."
199
+ "doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"
200
200
  },
201
201
  "volatile": {
202
202
  "type": "boolean",
@@ -877,6 +877,22 @@
877
877
  }
878
878
  },
879
879
  "property-type": "constant"
880
+ },
881
+ "fill-extrusion-edge-radius": {
882
+ "type": "number",
883
+ "private": true,
884
+ "default": 0,
885
+ "minimum": 0,
886
+ "maximum": 1,
887
+ "doc": "Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.",
888
+ "sdk-support": {
889
+ "basic functionality": {
890
+ "js": "v2.10.0",
891
+ "android": "10.7.0",
892
+ "ios": "10.7.0"
893
+ }
894
+ },
895
+ "property-type": "constant"
880
896
  }
881
897
  },
882
898
  "layout_line": {
@@ -1890,7 +1906,9 @@
1890
1906
  "macos": "0.1.0"
1891
1907
  },
1892
1908
  "data-driven styling": {
1893
- "js": "2.3.0"
1909
+ "js": "2.3.0",
1910
+ "android": "10.0.0",
1911
+ "ios": "10.0.0"
1894
1912
  }
1895
1913
  },
1896
1914
  "expression": {
@@ -2798,7 +2816,9 @@
2798
2816
  "group": "Lookup",
2799
2817
  "sdk-support": {
2800
2818
  "basic functionality": {
2801
- "js": "1.10.0"
2819
+ "js": "1.10.0",
2820
+ "android": "10.0.0",
2821
+ "ios": "10.0.0"
2802
2822
  }
2803
2823
  }
2804
2824
  },
@@ -2807,7 +2827,9 @@
2807
2827
  "group": "Lookup",
2808
2828
  "sdk-support": {
2809
2829
  "basic functionality": {
2810
- "js": "1.10.0"
2830
+ "js": "1.10.0",
2831
+ "android": "10.0.0",
2832
+ "ios": "10.0.0"
2811
2833
  }
2812
2834
  }
2813
2835
  },
@@ -3194,12 +3216,14 @@
3194
3216
  "group": "Feature data",
3195
3217
  "sdk-support": {
3196
3218
  "basic functionality": {
3197
- "js": "0.46.0"
3219
+ "js": "0.46.0",
3220
+ "android": "10.0.0",
3221
+ "ios": "10.0.0"
3198
3222
  }
3199
3223
  }
3200
3224
  },
3201
3225
  "geometry-type": {
3202
- "doc": "Returns the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",
3226
+ "doc": "Returns the feature's geometry type: `Point`, `LineString` or `Polygon`. `Multi*` feature types return the singular forms.",
3203
3227
  "group": "Feature data",
3204
3228
  "sdk-support": {
3205
3229
  "basic functionality": {
@@ -3239,7 +3263,9 @@
3239
3263
  "group": "Camera",
3240
3264
  "sdk-support": {
3241
3265
  "basic functionality": {
3242
- "js": "2.6.0"
3266
+ "js": "2.6.0",
3267
+ "android": "10.9.0",
3268
+ "ios": "10.9.0"
3243
3269
  }
3244
3270
  }
3245
3271
  },
@@ -3248,7 +3274,9 @@
3248
3274
  "group": "Camera",
3249
3275
  "sdk-support": {
3250
3276
  "basic functionality": {
3251
- "js": "2.6.0"
3277
+ "js": "2.6.0",
3278
+ "android": "10.9.0",
3279
+ "ios": "10.9.0"
3252
3280
  }
3253
3281
  }
3254
3282
  },
@@ -3736,7 +3764,9 @@
3736
3764
  "sdk-support": {
3737
3765
  "basic functionality": {
3738
3766
  "js": "0.45.0",
3739
- "android": "6.6.0"
3767
+ "android": "6.6.0",
3768
+ "ios": "4.1.0",
3769
+ "macos": "0.8.0"
3740
3770
  }
3741
3771
  }
3742
3772
  },
@@ -4659,6 +4689,7 @@
4659
4689
  "fill-extrusion-ambient-occlusion-intensity": {
4660
4690
  "property-type": "data-constant",
4661
4691
  "type": "number",
4692
+ "private": true,
4662
4693
  "default": 0.0,
4663
4694
  "minimum": 0,
4664
4695
  "maximum": 1,
@@ -4669,10 +4700,10 @@
4669
4700
  ]
4670
4701
  },
4671
4702
  "transition": true,
4672
- "doc": "Controls the intensity of ambient occlusion (AO) shading. Current AO implementation is a low-cost best-effort approach that shades area near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
4703
+ "doc": "Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.",
4673
4704
  "sdk-support": {
4674
4705
  "basic functionality": {
4675
- "js": "2.8.3",
4706
+ "js": "2.10.0",
4676
4707
  "android": "10.7.0",
4677
4708
  "ios": "10.7.0"
4678
4709
  }
@@ -4681,6 +4712,7 @@
4681
4712
  "fill-extrusion-ambient-occlusion-radius": {
4682
4713
  "property-type": "data-constant",
4683
4714
  "type": "number",
4715
+ "private": true,
4684
4716
  "default": 3.0,
4685
4717
  "minimum": 0,
4686
4718
  "expression": {
@@ -4690,10 +4722,13 @@
4690
4722
  ]
4691
4723
  },
4692
4724
  "transition": true,
4693
- "doc": "The radius of ambient occlusion (AO) shading, in meters. Current AO implementation is a low-cost best-effort approach that shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to hight of one floor and brings the most plausible results for buildings.",
4725
+ "doc": "Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.",
4726
+ "requires": [
4727
+ "fill-extrusion-edge-radius"
4728
+ ],
4694
4729
  "sdk-support": {
4695
4730
  "basic functionality": {
4696
- "js": "2.8.3",
4731
+ "js": "2.10.0",
4697
4732
  "android": "10.7.0",
4698
4733
  "ios": "10.7.0"
4699
4734
  }