@maplibre/maplibre-react-native 10.0.0-alpha.18 → 10.0.0-alpha.19

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/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ PR Title ([#123](link to my pr))
6
6
 
7
7
  ```
8
8
 
9
+ ## 10.0.0-alpha.19
10
+
11
+ feat: MapLibre Android SDK 11.5.0 ([#455](https://github.com/maplibre/maplibre-react-native/pull/455))
12
+
9
13
  ## 10.0.0-alpha.18
10
14
 
11
15
  fix: make MarkerView props with defaults optional ([#460](https://github.com/maplibre/maplibre-react-native/pull/460))
@@ -33,7 +33,7 @@ dependencies {
33
33
  implementation("com.facebook.react:react-android")
34
34
 
35
35
  // MapLibre SDK
36
- implementation "org.maplibre.gl:android-sdk:11.0.1"
36
+ implementation "org.maplibre.gl:android-sdk:11.5.0"
37
37
  implementation "org.maplibre.gl:android-sdk-turf:6.0.1"
38
38
 
39
39
  // Dependencies
@@ -45,9 +45,9 @@ dependencies {
45
45
 
46
46
 
47
47
  // MapLibre plugins
48
- implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.0")
49
- implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.0")
50
- implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.0")
48
+ implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.1")
49
+ implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.1")
50
+ implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.1")
51
51
  }
52
52
 
53
53
  allprojects {
@@ -27,7 +27,7 @@ import com.facebook.react.bridge.WritableArray;
27
27
  import com.facebook.react.bridge.WritableMap;
28
28
  import com.facebook.react.bridge.WritableNativeArray;
29
29
  import com.facebook.react.bridge.WritableNativeMap;
30
- import com.mapbox.android.gestures.MoveGestureDetector;
30
+ import org.maplibre.android.gestures.MoveGestureDetector;
31
31
  import org.maplibre.geojson.Feature;
32
32
  import org.maplibre.geojson.FeatureCollection;
33
33
  import org.maplibre.android.camera.CameraPosition;
@@ -229,7 +229,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
229
229
  feature = (AbstractMapFeature) childView;
230
230
  } else if (childView instanceof RCTMLNNativeUserLocation) {
231
231
  feature = (AbstractMapFeature) childView;
232
- } else if (childView instanceof RCTMLNPointAnnotation) {
232
+ } else if (childView instanceof RCTMLNPointAnnotation) {
233
233
  RCTMLNPointAnnotation annotation = (RCTMLNPointAnnotation) childView;
234
234
  mPointAnnotations.put(annotation.getID(), annotation);
235
235
  feature = (AbstractMapFeature) childView;
@@ -350,7 +350,8 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
350
350
  mMap.moveCamera(cameraUpdate);
351
351
  }
352
352
 
353
- public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator, MapLibreMap.CancelableCallback callback) {
353
+ public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator,
354
+ MapLibreMap.CancelableCallback callback) {
354
355
  mMap.easeCamera(cameraUpdate, duration, easingInterpolator, callback);
355
356
  }
356
357
 
@@ -435,7 +436,6 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
435
436
  return true;
436
437
  }
437
438
 
438
-
439
439
  @Override
440
440
  public void onMapReady(final MapLibreMap mapboxMap) {
441
441
  mMap = mapboxMap;
@@ -446,7 +446,6 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
446
446
  mMap.setStyle(new Style.Builder().fromUri(mStyleURL));
447
447
  }
448
448
 
449
-
450
449
  reflow();
451
450
 
452
451
  mMap.getStyle(new Style.OnStyleLoaded() {
@@ -501,7 +500,8 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
501
500
  }
502
501
 
503
502
  @Override
504
- public void onMoveEnd(MoveGestureDetector detector) {}
503
+ public void onMoveEnd(MoveGestureDetector detector) {
504
+ }
505
505
  });
506
506
  }
507
507
 
@@ -572,15 +572,15 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
572
572
  }
573
573
 
574
574
  private void setupLocalization(Style style) {
575
- mLocalizationPlugin = new LocalizationPlugin(RCTMLNMapView.this, mMap, style);
576
- if (mLocalizeLabels) {
577
- try {
578
- mLocalizationPlugin.matchMapLanguageWithDeviceDefault();
579
- } catch (Exception e) {
580
- final String localeString = Locale.getDefault().toString();
581
- Logger.w(LOG_TAG, String.format("Could not find matching locale for %s", localeString));
582
- }
583
- }
575
+ mLocalizationPlugin = new LocalizationPlugin(RCTMLNMapView.this, mMap, style);
576
+ if (mLocalizeLabels) {
577
+ try {
578
+ mLocalizationPlugin.matchMapLanguageWithDeviceDefault();
579
+ } catch (Exception e) {
580
+ final String localeString = Locale.getDefault().toString();
581
+ Logger.w(LOG_TAG, String.format("Could not find matching locale for %s", localeString));
582
+ }
583
+ }
584
584
  }
585
585
 
586
586
  @Override
@@ -645,8 +645,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
645
645
  source.onPress(new RCTSource.OnPressEvent(
646
646
  hits.get(source.getID()),
647
647
  point,
648
- screenPoint
649
- ));
648
+ screenPoint));
650
649
  return true;
651
650
  }
652
651
  }
@@ -870,11 +869,11 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
870
869
  mLogoGravity |= Gravity.BOTTOM;
871
870
  }
872
871
  float density = getDisplayDensity();
873
- mLogoMargins = new int[]{
874
- position.hasKey("left") ? (int) density * position.getInt("left") : 0,
875
- position.hasKey("top") ? (int) density * position.getInt("top") : 0,
876
- position.hasKey("right") ? (int) density * position.getInt("right") : 0,
877
- position.hasKey("bottom") ? (int) density * position.getInt("bottom") : 0
872
+ mLogoMargins = new int[] {
873
+ position.hasKey("left") ? (int) density * position.getInt("left") : 0,
874
+ position.hasKey("top") ? (int) density * position.getInt("top") : 0,
875
+ position.hasKey("right") ? (int) density * position.getInt("right") : 0,
876
+ position.hasKey("bottom") ? (int) density * position.getInt("bottom") : 0
878
877
  };
879
878
  updateUISettings();
880
879
  }
@@ -924,11 +923,11 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
924
923
  mAttributionGravity |= Gravity.BOTTOM;
925
924
  }
926
925
  float density = getDisplayDensity();
927
- mAttributionMargin = new int[]{
928
- position.hasKey("left") ? Math.round(density * position.getInt("left")) : 0,
929
- position.hasKey("top") ? Math.round(density * position.getInt("top")) : 0,
930
- position.hasKey("right") ? Math.round(density * position.getInt("right")) : 0,
931
- position.hasKey("bottom") ? Math.round(density * position.getInt("bottom")) : 0
926
+ mAttributionMargin = new int[] {
927
+ position.hasKey("left") ? Math.round(density * position.getInt("left")) : 0,
928
+ position.hasKey("top") ? Math.round(density * position.getInt("top")) : 0,
929
+ position.hasKey("right") ? Math.round(density * position.getInt("right")) : 0,
930
+ position.hasKey("bottom") ? Math.round(density * position.getInt("bottom")) : 0
932
931
  };
933
932
  updateUISettings();
934
933
  }
@@ -1048,7 +1047,8 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1048
1047
  manager.onClick(this);
1049
1048
  }
1050
1049
 
1051
- public void setSourceVisibility(final boolean visible, @NonNull final String sourceId, @Nullable final String sourceLayerId) {
1050
+ public void setSourceVisibility(final boolean visible, @NonNull final String sourceId,
1051
+ @Nullable final String sourceLayerId) {
1052
1052
  if (mMap == null) {
1053
1053
  return;
1054
1054
  }
@@ -1121,15 +1121,12 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1121
1121
  (uiSettings.getAttributionMarginLeft() != mAttributionMargin[0] ||
1122
1122
  uiSettings.getAttributionMarginTop() != mAttributionMargin[1] ||
1123
1123
  uiSettings.getAttributionMarginRight() != mAttributionMargin[2] ||
1124
- uiSettings.getAttributionMarginBottom() != mAttributionMargin[3]
1125
- )
1126
- ) {
1124
+ uiSettings.getAttributionMarginBottom() != mAttributionMargin[3])) {
1127
1125
  uiSettings.setAttributionMargins(
1128
- mAttributionMargin[0],
1129
- mAttributionMargin[1],
1130
- mAttributionMargin[2],
1131
- mAttributionMargin[3]
1132
- );
1126
+ mAttributionMargin[0],
1127
+ mAttributionMargin[1],
1128
+ mAttributionMargin[2],
1129
+ mAttributionMargin[3]);
1133
1130
  }
1134
1131
 
1135
1132
  if (mTintColor != null) {
@@ -1145,18 +1142,15 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1145
1142
  }
1146
1143
 
1147
1144
  if (mLogoMargins != null &&
1148
- (uiSettings.getLogoMarginLeft() != mLogoMargins[0] ||
1149
- uiSettings.getLogoMarginTop() != mLogoMargins[1] ||
1150
- uiSettings.getLogoMarginRight() != mLogoMargins[2] ||
1151
- uiSettings.getLogoMarginBottom() != mLogoMargins[3]
1152
- )
1153
- ) {
1145
+ (uiSettings.getLogoMarginLeft() != mLogoMargins[0] ||
1146
+ uiSettings.getLogoMarginTop() != mLogoMargins[1] ||
1147
+ uiSettings.getLogoMarginRight() != mLogoMargins[2] ||
1148
+ uiSettings.getLogoMarginBottom() != mLogoMargins[3])) {
1154
1149
  uiSettings.setLogoMargins(
1155
- mLogoMargins[0],
1156
- mLogoMargins[1],
1157
- mLogoMargins[2],
1158
- mLogoMargins[3]
1159
- );
1150
+ mLogoMargins[0],
1151
+ mLogoMargins[1],
1152
+ mLogoMargins[2],
1153
+ mLogoMargins[3]);
1160
1154
  }
1161
1155
 
1162
1156
  if (mCompassEnabled != null && uiSettings.isCompassEnabled() != mCompassEnabled) {
@@ -1220,7 +1214,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1220
1214
 
1221
1215
  public double[] getContentInset() {
1222
1216
  if (mInsets == null) {
1223
- double[] result = {0,0,0,0};
1217
+ double[] result = { 0, 0, 0, 0 };
1224
1218
 
1225
1219
  return result;
1226
1220
  }
@@ -1245,7 +1239,8 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1245
1239
 
1246
1240
  final DisplayMetrics metrics = mContext.getResources().getDisplayMetrics();
1247
1241
 
1248
- double[] result = {left * metrics.scaledDensity, top * metrics.scaledDensity, right * metrics.scaledDensity, bottom * metrics.scaledDensity};
1242
+ double[] result = { left * metrics.scaledDensity, top * metrics.scaledDensity, right * metrics.scaledDensity,
1243
+ bottom * metrics.scaledDensity };
1249
1244
  return result;
1250
1245
  }
1251
1246
 
@@ -1288,7 +1283,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1288
1283
 
1289
1284
  private WritableMap makeRegionPayload(Boolean isAnimated) {
1290
1285
  CameraPosition position = mMap.getCameraPosition();
1291
- if(position == null || position.target == null) {
1286
+ if (position == null || position.target == null) {
1292
1287
  return new WritableNativeMap();
1293
1288
  }
1294
1289
  LatLng latLng = new LatLng(position.target.getLatitude(), position.target.getLongitude());
@@ -1305,8 +1300,9 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1305
1300
  try {
1306
1301
  VisibleRegion visibleRegion = mMap.getProjection().getVisibleRegion();
1307
1302
  properties.putArray("visibleBounds", GeoJSONUtils.fromLatLngBounds(visibleRegion.latLngBounds));
1308
- } catch(Exception ex) {
1309
- Logger.e(LOG_TAG, String.format("An error occurred while attempting to make the region: %s", ex.getMessage()));
1303
+ } catch (Exception ex) {
1304
+ Logger.e(LOG_TAG,
1305
+ String.format("An error occurred while attempting to make the region: %s", ex.getMessage()));
1310
1306
  }
1311
1307
 
1312
1308
  return GeoJSONUtils.toPointFeature(latLng, properties);
@@ -1316,7 +1312,7 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1316
1312
  IEvent event = new MapChangeEvent(this, EventTypes.REGION_DID_CHANGE,
1317
1313
  makeRegionPayload(new Boolean(isAnimated)));
1318
1314
 
1319
- mManager.handleEvent(event);
1315
+ mManager.handleEvent(event);
1320
1316
  mCameraChangeTracker.setReason(CameraChangeTracker.EMPTY);
1321
1317
  }
1322
1318
 
@@ -1471,25 +1467,27 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1471
1467
  }
1472
1468
 
1473
1469
  /**
1474
- * Adds the marker image to the map for use as a SymbolLayer icon
1475
- */
1470
+ * Adds the marker image to the map for use as a SymbolLayer icon
1471
+ */
1476
1472
  private void setUpImage(@NonNull Style loadedStyle) {
1477
1473
  loadedStyle.addImage("MARKER_IMAGE_ID", BitmapFactory.decodeResource(
1478
- this.getResources(), R.drawable.red_marker)
1479
- );
1474
+ this.getResources(), R.drawable.red_marker));
1480
1475
  }
1481
1476
 
1482
1477
  /**
1483
- * PointAnnotations are rendered to a canvas, but react native Image component is
1484
- * implemented on top of Fresco, and fresco will not load images when their view is
1485
- * not attached to the window. So we'll have an offscreen view where we add those views
1478
+ * PointAnnotations are rendered to a canvas, but react native Image component
1479
+ * is
1480
+ * implemented on top of Fresco, and fresco will not load images when their view
1481
+ * is
1482
+ * not attached to the window. So we'll have an offscreen view where we add
1483
+ * those views
1486
1484
  * so they can rendered full to canvas.
1487
1485
  */
1488
1486
  public ViewGroup offscreenAnnotationViewContainer() {
1489
1487
  if (mOffscreenAnnotationViewContainer == null) {
1490
1488
  mOffscreenAnnotationViewContainer = new FrameLayout(getContext());
1491
- FrameLayout.LayoutParams flParams = new FrameLayout.LayoutParams(0,0);
1492
- flParams.setMargins(-10000, -10000, -10000,-10000);
1489
+ FrameLayout.LayoutParams flParams = new FrameLayout.LayoutParams(0, 0);
1490
+ flParams.setMargins(-10000, -10000, -10000, -10000);
1493
1491
  mOffscreenAnnotationViewContainer.setLayoutParams(flParams);
1494
1492
  addView(mOffscreenAnnotationViewContainer);
1495
1493
  }
@@ -1518,10 +1516,12 @@ public class RCTMLNMapView extends MapView implements OnMapReadyCallback, MapLib
1518
1516
  }
1519
1517
 
1520
1518
  public void setTintColor(@Nullable Integer tintColor) {
1521
- if (mTintColor == tintColor) return;
1519
+ if (mTintColor == tintColor)
1520
+ return;
1522
1521
  mTintColor = tintColor;
1523
1522
  updateUISettings();
1524
- if (mLocationComponentManager == null) return;
1523
+ if (mLocationComponentManager == null)
1524
+ return;
1525
1525
  mLocationComponentManager.update(getMapboxMap().getStyle());
1526
1526
  }
1527
1527
  }
@@ -582,6 +582,9 @@ public class RCTMLNStyleFactory {
582
582
  case "fillExtrusionBaseTransition":
583
583
  RCTMLNStyleFactory.setFillExtrusionBaseTransition(layer, styleValue);
584
584
  break;
585
+ case "fillExtrusionVerticalGradient":
586
+ RCTMLNStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue);
587
+ break;
585
588
  }
586
589
  }
587
590
  }
@@ -1207,7 +1210,7 @@ public class RCTMLNStyleFactory {
1207
1210
  if (styleValue.isExpression()) {
1208
1211
  layer.setProperties(PropertyFactory.iconPadding(styleValue.getExpression()));
1209
1212
  } else {
1210
- layer.setProperties(PropertyFactory.iconPadding(styleValue.getFloat(VALUE_KEY)));
1213
+ layer.setProperties(PropertyFactory.iconPadding(styleValue.getFloatArray(VALUE_KEY)));
1211
1214
  }
1212
1215
  }
1213
1216
 
@@ -1975,6 +1978,14 @@ public class RCTMLNStyleFactory {
1975
1978
  }
1976
1979
  }
1977
1980
 
1981
+ public static void setFillExtrusionVerticalGradient(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) {
1982
+ if (styleValue.isExpression()) {
1983
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getExpression()));
1984
+ } else {
1985
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getBoolean(VALUE_KEY)));
1986
+ }
1987
+ }
1988
+
1978
1989
  public static void setVisibility(RasterLayer layer, RCTMLNStyleValue styleValue) {
1979
1990
  layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
1980
1991
  }
@@ -19,6 +19,7 @@
19
19
  * <a href="#name-5">fillExtrusionPattern</a><br/>
20
20
  * <a href="#name-6">fillExtrusionHeight</a><br/>
21
21
  * <a href="#name-7">fillExtrusionBase</a><br/>
22
+ * <a href="#name-8">fillExtrusionVerticalGradient</a><br/>
22
23
 
23
24
  ___
24
25
 
@@ -317,3 +318,21 @@ The transition affecting any changes to this layer’s fillExtrusionBase propery
317
318
  `{duration: 300, delay: 0}`
318
319
 
319
320
 
321
+ ___
322
+
323
+ #### Name
324
+ `fillExtrusionVerticalGradient`
325
+
326
+ #### Description
327
+ Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
328
+
329
+ #### Type
330
+ `boolean`
331
+ #### Default Value
332
+ `true`
333
+
334
+
335
+ #### Expression
336
+
337
+ Parameters: `zoom`
338
+
@@ -329,7 +329,7 @@ ___
329
329
  `rasterFadeDuration`
330
330
 
331
331
  #### Description
332
- Fade duration when a new tile is added.
332
+ Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
333
333
 
334
334
  #### Type
335
335
  `number`
@@ -389,12 +389,12 @@ ___
389
389
  `iconPadding`
390
390
 
391
391
  #### Description
392
- Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a oneElement array padding applied to all sides.
392
+ Size of additional area round the icon bounding box used for detecting symbol collisions.
393
393
 
394
394
  #### Type
395
- `number`
395
+ `array<number>`
396
396
  #### Default Value
397
- `2`
397
+ `[2]`
398
398
 
399
399
  #### Units
400
400
  `pixels`
@@ -1122,7 +1122,7 @@ ___
1122
1122
  `iconColor`
1123
1123
 
1124
1124
  #### Description
1125
- The color of the icon. This can only be used with sdf icons.
1125
+ The color of the icon. This can only be used with SDF icons.
1126
1126
 
1127
1127
  #### Type
1128
1128
  `color`
@@ -1204,7 +1204,9 @@ ___
1204
1204
  `iconHaloWidth`
1205
1205
 
1206
1206
  #### Description
1207
- Distance of halo to the icon outline.
1207
+ Distance of halo to the icon outline.
1208
+
1209
+ The unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.
1208
1210
 
1209
1211
  #### Type
1210
1212
  `number`
package/docs/docs.json CHANGED
@@ -1072,6 +1072,23 @@
1072
1072
  ]
1073
1073
  },
1074
1074
  "transition": true
1075
+ },
1076
+ {
1077
+ "name": "fillExtrusionVerticalGradient",
1078
+ "type": "boolean",
1079
+ "values": [],
1080
+ "default": true,
1081
+ "description": "Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.",
1082
+ "requires": [],
1083
+ "disabledBy": [],
1084
+ "allowedFunctionTypes": [],
1085
+ "expression": {
1086
+ "interpolated": false,
1087
+ "parameters": [
1088
+ "zoom"
1089
+ ]
1090
+ },
1091
+ "transition": false
1075
1092
  }
1076
1093
  ]
1077
1094
  },
@@ -2966,7 +2983,7 @@
2966
2983
  "minimum": 0,
2967
2984
  "units": "milliseconds",
2968
2985
  "default": 300,
2969
- "description": "Fade duration when a new tile is added.",
2986
+ "description": "Fade duration when a new tile is added, or when a video is started or its coordinates are updated.",
2970
2987
  "requires": [],
2971
2988
  "disabledBy": [],
2972
2989
  "allowedFunctionTypes": [],
@@ -3733,11 +3750,13 @@
3733
3750
  },
3734
3751
  {
3735
3752
  "name": "iconPadding",
3736
- "type": "number",
3753
+ "type": "array<number>",
3737
3754
  "values": [],
3738
3755
  "units": "pixels",
3739
- "default": 2,
3740
- "description": "Size of additional area round the icon bounding box used for detecting symbol collisions. Values are declared using CSS margin shorthand syntax: a single value applies to all four sides; two values apply to [top/bottom, left/right]; three values apply to [top, left/right, bottom]; four values apply to [top, right, bottom, left]. For backwards compatibility, a single bare number is accepted, and treated the same as a oneElement array padding applied to all sides.",
3756
+ "default": [
3757
+ 2
3758
+ ],
3759
+ "description": "Size of additional area round the icon bounding box used for detecting symbol collisions.",
3741
3760
  "requires": [
3742
3761
  "iconImage"
3743
3762
  ],
@@ -4460,7 +4479,7 @@
4460
4479
  "type": "color",
4461
4480
  "values": [],
4462
4481
  "default": "#000000",
4463
- "description": "The color of the icon. This can only be used with sdf icons.",
4482
+ "description": "The color of the icon. This can only be used with SDF icons.",
4464
4483
  "requires": [
4465
4484
  "iconImage"
4466
4485
  ],
@@ -4504,7 +4523,7 @@
4504
4523
  "minimum": 0,
4505
4524
  "units": "pixels",
4506
4525
  "default": 0,
4507
- "description": "Distance of halo to the icon outline.",
4526
+ "description": "Distance of halo to the icon outline. \n\nThe unit is in pixels only for SDF sprites that were created with a blur radius of 8, multiplied by the display density. I.e., the radius needs to be 16 for `@2x` sprites, etc.",
4508
4527
  "requires": [
4509
4528
  "iconImage"
4510
4529
  ],
@@ -177,6 +177,7 @@
177
177
  - (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
178
178
  - (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
179
179
  - (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
180
+ - (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
180
181
  - (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
181
182
  - (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
182
183
  - (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
@@ -499,6 +499,8 @@
499
499
  [self setFillExtrusionBase:layer withReactStyleValue:styleValue];
500
500
  } else if ([prop isEqualToString:@"fillExtrusionBaseTransition"]) {
501
501
  [self setFillExtrusionBaseTransition:layer withReactStyleValue:styleValue];
502
+ } else if ([prop isEqualToString:@"fillExtrusionVerticalGradient"]) {
503
+ [self setFillExtrusionVerticalGradient:layer withReactStyleValue:styleValue];
502
504
  } else {
503
505
  // TODO throw exception
504
506
  }
@@ -1457,6 +1459,11 @@
1457
1459
  layer.fillExtrusionBaseTransition = [styleValue getTransition];
1458
1460
  }
1459
1461
 
1462
+ - (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue
1463
+ {
1464
+ layer.fillExtrusionHasVerticalGradient = styleValue.mlnStyleValue;
1465
+ }
1466
+
1460
1467
 
1461
1468
 
1462
1469
  - (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue
@@ -127,7 +127,10 @@ const Annotation = React.forwardRef<AnnotationRef, AnnotationProps>(
127
127
 
128
128
  const children = [];
129
129
  const symbolStyle: SymbolLayerStyleProps | undefined = props.icon
130
- ? { ...props.style, iconImage: props.icon }
130
+ ? {
131
+ ...props.style,
132
+ iconImage: typeof props.icon === "string" ? props.icon : undefined,
133
+ }
131
134
  : undefined;
132
135
 
133
136
  if (symbolStyle) {