diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67f420b51..7eb8890fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ PR Title ([#123](link to my pr))
```
+## 10.0.0-alpha.19
+
+feat: MapLibre Android SDK 11.5.0 ([#455](https://github.com/maplibre/maplibre-react-native/pull/455))
+
## 10.0.0-alpha.18
fix: make MarkerView props with defaults optional ([#460](https://github.com/maplibre/maplibre-react-native/pull/460))
diff --git a/android/rctmln/build.gradle b/android/rctmln/build.gradle
index 7ea3e1d3c..e0ebb0c21 100644
--- a/android/rctmln/build.gradle
+++ b/android/rctmln/build.gradle
@@ -33,7 +33,7 @@ dependencies {
implementation("com.facebook.react:react-android")
// MapLibre SDK
- implementation "org.maplibre.gl:android-sdk:11.0.1"
+ implementation "org.maplibre.gl:android-sdk:11.5.0"
implementation "org.maplibre.gl:android-sdk-turf:6.0.1"
// Dependencies
@@ -45,9 +45,9 @@ dependencies {
// MapLibre plugins
- implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.0")
- implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.0")
- implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.0")
+ implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.1")
+ implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.1")
+ implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.1")
}
allprojects {
diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
index 76b6538a6..fc9526077 100644
--- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
+++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java
@@ -27,7 +27,7 @@
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeArray;
import com.facebook.react.bridge.WritableNativeMap;
-import com.mapbox.android.gestures.MoveGestureDetector;
+import org.maplibre.android.gestures.MoveGestureDetector;
import org.maplibre.geojson.Feature;
import org.maplibre.geojson.FeatureCollection;
import org.maplibre.android.camera.CameraPosition;
@@ -229,7 +229,7 @@ public void addFeature(View childView, int childPosition) {
feature = (AbstractMapFeature) childView;
} else if (childView instanceof RCTMLNNativeUserLocation) {
feature = (AbstractMapFeature) childView;
- } else if (childView instanceof RCTMLNPointAnnotation) {
+ } else if (childView instanceof RCTMLNPointAnnotation) {
RCTMLNPointAnnotation annotation = (RCTMLNPointAnnotation) childView;
mPointAnnotations.put(annotation.getID(), annotation);
feature = (AbstractMapFeature) childView;
@@ -350,7 +350,8 @@ public void moveCamera(CameraUpdate cameraUpdate) {
mMap.moveCamera(cameraUpdate);
}
- public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator, MapLibreMap.CancelableCallback callback) {
+ public void easeCamera(CameraUpdate cameraUpdate, int duration, boolean easingInterpolator,
+ MapLibreMap.CancelableCallback callback) {
mMap.easeCamera(cameraUpdate, duration, easingInterpolator, callback);
}
@@ -435,7 +436,6 @@ public boolean isJSONValid(String test) {
return true;
}
-
@Override
public void onMapReady(final MapLibreMap mapboxMap) {
mMap = mapboxMap;
@@ -446,7 +446,6 @@ public void onMapReady(final MapLibreMap mapboxMap) {
mMap.setStyle(new Style.Builder().fromUri(mStyleURL));
}
-
reflow();
mMap.getStyle(new Style.OnStyleLoaded() {
@@ -501,7 +500,8 @@ public void onMove(MoveGestureDetector detector) {
}
@Override
- public void onMoveEnd(MoveGestureDetector detector) {}
+ public void onMoveEnd(MoveGestureDetector detector) {
+ }
});
}
@@ -572,15 +572,15 @@ public void addQueuedFeatures() {
}
private void setupLocalization(Style style) {
- mLocalizationPlugin = new LocalizationPlugin(RCTMLNMapView.this, mMap, style);
- if (mLocalizeLabels) {
- try {
- mLocalizationPlugin.matchMapLanguageWithDeviceDefault();
- } catch (Exception e) {
- final String localeString = Locale.getDefault().toString();
- Logger.w(LOG_TAG, String.format("Could not find matching locale for %s", localeString));
- }
- }
+ mLocalizationPlugin = new LocalizationPlugin(RCTMLNMapView.this, mMap, style);
+ if (mLocalizeLabels) {
+ try {
+ mLocalizationPlugin.matchMapLanguageWithDeviceDefault();
+ } catch (Exception e) {
+ final String localeString = Locale.getDefault().toString();
+ Logger.w(LOG_TAG, String.format("Could not find matching locale for %s", localeString));
+ }
+ }
}
@Override
@@ -645,8 +645,7 @@ public boolean onMapClick(@NonNull LatLng point) {
source.onPress(new RCTSource.OnPressEvent(
hits.get(source.getID()),
point,
- screenPoint
- ));
+ screenPoint));
return true;
}
}
@@ -870,11 +869,11 @@ public void setReactLogoPosition(ReadableMap position) {
mLogoGravity |= Gravity.BOTTOM;
}
float density = getDisplayDensity();
- mLogoMargins = new int[]{
- position.hasKey("left") ? (int) density * position.getInt("left") : 0,
- position.hasKey("top") ? (int) density * position.getInt("top") : 0,
- position.hasKey("right") ? (int) density * position.getInt("right") : 0,
- position.hasKey("bottom") ? (int) density * position.getInt("bottom") : 0
+ mLogoMargins = new int[] {
+ position.hasKey("left") ? (int) density * position.getInt("left") : 0,
+ position.hasKey("top") ? (int) density * position.getInt("top") : 0,
+ position.hasKey("right") ? (int) density * position.getInt("right") : 0,
+ position.hasKey("bottom") ? (int) density * position.getInt("bottom") : 0
};
updateUISettings();
}
@@ -924,11 +923,11 @@ public void setReactAttributionPosition(ReadableMap position) {
mAttributionGravity |= Gravity.BOTTOM;
}
float density = getDisplayDensity();
- mAttributionMargin = new int[]{
- position.hasKey("left") ? Math.round(density * position.getInt("left")) : 0,
- position.hasKey("top") ? Math.round(density * position.getInt("top")) : 0,
- position.hasKey("right") ? Math.round(density * position.getInt("right")) : 0,
- position.hasKey("bottom") ? Math.round(density * position.getInt("bottom")) : 0
+ mAttributionMargin = new int[] {
+ position.hasKey("left") ? Math.round(density * position.getInt("left")) : 0,
+ position.hasKey("top") ? Math.round(density * position.getInt("top")) : 0,
+ position.hasKey("right") ? Math.round(density * position.getInt("right")) : 0,
+ position.hasKey("bottom") ? Math.round(density * position.getInt("bottom")) : 0
};
updateUISettings();
}
@@ -1048,7 +1047,8 @@ public void showAttribution() {
manager.onClick(this);
}
- public void setSourceVisibility(final boolean visible, @NonNull final String sourceId, @Nullable final String sourceLayerId) {
+ public void setSourceVisibility(final boolean visible, @NonNull final String sourceId,
+ @Nullable final String sourceLayerId) {
if (mMap == null) {
return;
}
@@ -1121,15 +1121,12 @@ private void updateUISettings() {
(uiSettings.getAttributionMarginLeft() != mAttributionMargin[0] ||
uiSettings.getAttributionMarginTop() != mAttributionMargin[1] ||
uiSettings.getAttributionMarginRight() != mAttributionMargin[2] ||
- uiSettings.getAttributionMarginBottom() != mAttributionMargin[3]
- )
- ) {
+ uiSettings.getAttributionMarginBottom() != mAttributionMargin[3])) {
uiSettings.setAttributionMargins(
- mAttributionMargin[0],
- mAttributionMargin[1],
- mAttributionMargin[2],
- mAttributionMargin[3]
- );
+ mAttributionMargin[0],
+ mAttributionMargin[1],
+ mAttributionMargin[2],
+ mAttributionMargin[3]);
}
if (mTintColor != null) {
@@ -1145,18 +1142,15 @@ private void updateUISettings() {
}
if (mLogoMargins != null &&
- (uiSettings.getLogoMarginLeft() != mLogoMargins[0] ||
- uiSettings.getLogoMarginTop() != mLogoMargins[1] ||
- uiSettings.getLogoMarginRight() != mLogoMargins[2] ||
- uiSettings.getLogoMarginBottom() != mLogoMargins[3]
- )
- ) {
+ (uiSettings.getLogoMarginLeft() != mLogoMargins[0] ||
+ uiSettings.getLogoMarginTop() != mLogoMargins[1] ||
+ uiSettings.getLogoMarginRight() != mLogoMargins[2] ||
+ uiSettings.getLogoMarginBottom() != mLogoMargins[3])) {
uiSettings.setLogoMargins(
- mLogoMargins[0],
- mLogoMargins[1],
- mLogoMargins[2],
- mLogoMargins[3]
- );
+ mLogoMargins[0],
+ mLogoMargins[1],
+ mLogoMargins[2],
+ mLogoMargins[3]);
}
if (mCompassEnabled != null && uiSettings.isCompassEnabled() != mCompassEnabled) {
@@ -1220,7 +1214,7 @@ private void updatePreferredFramesPerSecond() {
public double[] getContentInset() {
if (mInsets == null) {
- double[] result = {0,0,0,0};
+ double[] result = { 0, 0, 0, 0 };
return result;
}
@@ -1245,7 +1239,8 @@ public double[] getContentInset() {
final DisplayMetrics metrics = mContext.getResources().getDisplayMetrics();
- double[] result = {left * metrics.scaledDensity, top * metrics.scaledDensity, right * metrics.scaledDensity, bottom * metrics.scaledDensity};
+ double[] result = { left * metrics.scaledDensity, top * metrics.scaledDensity, right * metrics.scaledDensity,
+ bottom * metrics.scaledDensity };
return result;
}
@@ -1288,7 +1283,7 @@ public void onHostDestroy() {
private WritableMap makeRegionPayload(Boolean isAnimated) {
CameraPosition position = mMap.getCameraPosition();
- if(position == null || position.target == null) {
+ if (position == null || position.target == null) {
return new WritableNativeMap();
}
LatLng latLng = new LatLng(position.target.getLatitude(), position.target.getLongitude());
@@ -1305,8 +1300,9 @@ private WritableMap makeRegionPayload(Boolean isAnimated) {
try {
VisibleRegion visibleRegion = mMap.getProjection().getVisibleRegion();
properties.putArray("visibleBounds", GeoJSONUtils.fromLatLngBounds(visibleRegion.latLngBounds));
- } catch(Exception ex) {
- Logger.e(LOG_TAG, String.format("An error occurred while attempting to make the region: %s", ex.getMessage()));
+ } catch (Exception ex) {
+ Logger.e(LOG_TAG,
+ String.format("An error occurred while attempting to make the region: %s", ex.getMessage()));
}
return GeoJSONUtils.toPointFeature(latLng, properties);
@@ -1316,7 +1312,7 @@ public void sendRegionChangeEvent(boolean isAnimated) {
IEvent event = new MapChangeEvent(this, EventTypes.REGION_DID_CHANGE,
makeRegionPayload(new Boolean(isAnimated)));
- mManager.handleEvent(event);
+ mManager.handleEvent(event);
mCameraChangeTracker.setReason(CameraChangeTracker.EMPTY);
}
@@ -1471,25 +1467,27 @@ private WritableMap makeLocationChangePayload(Location location) {
}
/**
- * Adds the marker image to the map for use as a SymbolLayer icon
- */
+ * Adds the marker image to the map for use as a SymbolLayer icon
+ */
private void setUpImage(@NonNull Style loadedStyle) {
loadedStyle.addImage("MARKER_IMAGE_ID", BitmapFactory.decodeResource(
- this.getResources(), R.drawable.red_marker)
- );
+ this.getResources(), R.drawable.red_marker));
}
/**
- * PointAnnotations are rendered to a canvas, but react native Image component is
- * implemented on top of Fresco, and fresco will not load images when their view is
- * not attached to the window. So we'll have an offscreen view where we add those views
+ * PointAnnotations are rendered to a canvas, but react native Image component
+ * is
+ * implemented on top of Fresco, and fresco will not load images when their view
+ * is
+ * not attached to the window. So we'll have an offscreen view where we add
+ * those views
* so they can rendered full to canvas.
*/
public ViewGroup offscreenAnnotationViewContainer() {
if (mOffscreenAnnotationViewContainer == null) {
mOffscreenAnnotationViewContainer = new FrameLayout(getContext());
- FrameLayout.LayoutParams flParams = new FrameLayout.LayoutParams(0,0);
- flParams.setMargins(-10000, -10000, -10000,-10000);
+ FrameLayout.LayoutParams flParams = new FrameLayout.LayoutParams(0, 0);
+ flParams.setMargins(-10000, -10000, -10000, -10000);
mOffscreenAnnotationViewContainer.setLayoutParams(flParams);
addView(mOffscreenAnnotationViewContainer);
}
@@ -1518,10 +1516,12 @@ public LocationComponentManager getLocationComponentManager() {
}
public void setTintColor(@Nullable Integer tintColor) {
- if (mTintColor == tintColor) return;
+ if (mTintColor == tintColor)
+ return;
mTintColor = tintColor;
updateUISettings();
- if (mLocationComponentManager == null) return;
+ if (mLocationComponentManager == null)
+ return;
mLocationComponentManager.update(getMapboxMap().getStyle());
}
}
diff --git a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java
index 56118a255..6f5656faf 100644
--- a/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java
+++ b/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java
@@ -582,6 +582,9 @@ public void onAllImagesLoaded() {
case "fillExtrusionBaseTransition":
RCTMLNStyleFactory.setFillExtrusionBaseTransition(layer, styleValue);
break;
+ case "fillExtrusionVerticalGradient":
+ RCTMLNStyleFactory.setFillExtrusionVerticalGradient(layer, styleValue);
+ break;
}
}
}
@@ -1207,7 +1210,7 @@ public static void setIconPadding(SymbolLayer layer, RCTMLNStyleValue styleValue
if (styleValue.isExpression()) {
layer.setProperties(PropertyFactory.iconPadding(styleValue.getExpression()));
} else {
- layer.setProperties(PropertyFactory.iconPadding(styleValue.getFloat(VALUE_KEY)));
+ layer.setProperties(PropertyFactory.iconPadding(styleValue.getFloatArray(VALUE_KEY)));
}
}
@@ -1975,6 +1978,14 @@ public static void setFillExtrusionBaseTransition(FillExtrusionLayer layer, RCTM
}
}
+ public static void setFillExtrusionVerticalGradient(FillExtrusionLayer layer, RCTMLNStyleValue styleValue) {
+ if (styleValue.isExpression()) {
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getExpression()));
+ } else {
+ layer.setProperties(PropertyFactory.fillExtrusionVerticalGradient(styleValue.getBoolean(VALUE_KEY)));
+ }
+ }
+
public static void setVisibility(RasterLayer layer, RCTMLNStyleValue styleValue) {
layer.setProperties(PropertyFactory.visibility(styleValue.getString(VALUE_KEY)));
}
diff --git a/docs/FillExtrusionLayer.md b/docs/FillExtrusionLayer.md
index 84465f943..c0b469d87 100644
--- a/docs/FillExtrusionLayer.md
+++ b/docs/FillExtrusionLayer.md
@@ -19,6 +19,7 @@
* fillExtrusionPattern
* fillExtrusionHeight
* fillExtrusionBase
+* fillExtrusionVerticalGradient
___
@@ -317,3 +318,21 @@ The transition affecting any changes to this layer’s fillExtrusionBase propery
`{duration: 300, delay: 0}`
+___
+
+#### Name
+`fillExtrusionVerticalGradient`
+
+#### Description
+Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
+
+#### Type
+`boolean`
+#### Default Value
+`true`
+
+
+#### Expression
+
+Parameters: `zoom`
+
diff --git a/docs/RasterLayer.md b/docs/RasterLayer.md
index 36cf28064..e6c87fc4c 100644
--- a/docs/RasterLayer.md
+++ b/docs/RasterLayer.md
@@ -329,7 +329,7 @@ ___
`rasterFadeDuration`
#### Description
-Fade duration when a new tile is added.
+Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
#### Type
`number`
diff --git a/docs/SymbolLayer.md b/docs/SymbolLayer.md
index 05aa5ed15..fe12f9e9a 100644
--- a/docs/SymbolLayer.md
+++ b/docs/SymbolLayer.md
@@ -389,12 +389,12 @@ ___
`iconPadding`
#### 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.
+Size of additional area round the icon bounding box used for detecting symbol collisions.
#### Type
-`number`
+`array`
#### Default Value
-`2`
+`[2]`
#### Units
`pixels`
@@ -1122,7 +1122,7 @@ ___
`iconColor`
#### Description
-The color of the icon. This can only be used with sdf icons.
+The color of the icon. This can only be used with SDF icons.
#### Type
`color`
@@ -1204,7 +1204,9 @@ ___
`iconHaloWidth`
#### Description
-Distance of halo to the icon outline.
+Distance of halo to the icon outline.
+
+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.
#### Type
`number`
diff --git a/docs/docs.json b/docs/docs.json
index f5202da66..d2c0d5aa6 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -1072,6 +1072,23 @@
]
},
"transition": true
+ },
+ {
+ "name": "fillExtrusionVerticalGradient",
+ "type": "boolean",
+ "values": [],
+ "default": true,
+ "description": "Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.",
+ "requires": [],
+ "disabledBy": [],
+ "allowedFunctionTypes": [],
+ "expression": {
+ "interpolated": false,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": false
}
]
},
@@ -2966,7 +2983,7 @@
"minimum": 0,
"units": "milliseconds",
"default": 300,
- "description": "Fade duration when a new tile is added.",
+ "description": "Fade duration when a new tile is added, or when a video is started or its coordinates are updated.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [],
@@ -3733,11 +3750,13 @@
},
{
"name": "iconPadding",
- "type": "number",
+ "type": "array",
"values": [],
"units": "pixels",
- "default": 2,
- "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.",
+ "default": [
+ 2
+ ],
+ "description": "Size of additional area round the icon bounding box used for detecting symbol collisions.",
"requires": [
"iconImage"
],
@@ -4460,7 +4479,7 @@
"type": "color",
"values": [],
"default": "#000000",
- "description": "The color of the icon. This can only be used with sdf icons.",
+ "description": "The color of the icon. This can only be used with SDF icons.",
"requires": [
"iconImage"
],
@@ -4504,7 +4523,7 @@
"minimum": 0,
"units": "pixels",
"default": 0,
- "description": "Distance of halo to the icon outline.",
+ "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.",
"requires": [
"iconImage"
],
diff --git a/ios/RCTMLN/RCTMLNStyle.h b/ios/RCTMLN/RCTMLNStyle.h
index 383e6dea3..ef3d92889 100644
--- a/ios/RCTMLN/RCTMLNStyle.h
+++ b/ios/RCTMLN/RCTMLNStyle.h
@@ -177,6 +177,7 @@
- (void)setFillExtrusionHeightTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
- (void)setFillExtrusionBase:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
- (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
+- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
- (void)setRasterOpacity:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
- (void)setRasterOpacityTransition:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue;
diff --git a/ios/RCTMLN/RCTMLNStyle.m b/ios/RCTMLN/RCTMLNStyle.m
index a6be18488..a5ffbe604 100644
--- a/ios/RCTMLN/RCTMLNStyle.m
+++ b/ios/RCTMLN/RCTMLNStyle.m
@@ -499,6 +499,8 @@ - (void)fillExtrusionLayer:(MLNFillExtrusionStyleLayer *)layer withReactStyle:(N
[self setFillExtrusionBase:layer withReactStyleValue:styleValue];
} else if ([prop isEqualToString:@"fillExtrusionBaseTransition"]) {
[self setFillExtrusionBaseTransition:layer withReactStyleValue:styleValue];
+ } else if ([prop isEqualToString:@"fillExtrusionVerticalGradient"]) {
+ [self setFillExtrusionVerticalGradient:layer withReactStyleValue:styleValue];
} else {
// TODO throw exception
}
@@ -1457,6 +1459,11 @@ - (void)setFillExtrusionBaseTransition:(MLNFillExtrusionStyleLayer *)layer withR
layer.fillExtrusionBaseTransition = [styleValue getTransition];
}
+- (void)setFillExtrusionVerticalGradient:(MLNFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue
+{
+ layer.fillExtrusionHasVerticalGradient = styleValue.mlnStyleValue;
+}
+
- (void)setRasterStyleLayerVisibility:(MLNRasterStyleLayer *)layer withReactStyleValue:(RCTMLNStyleValue *)styleValue
diff --git a/javascript/components/annotations/Annotation.tsx b/javascript/components/annotations/Annotation.tsx
index 448e8d798..68057e56a 100644
--- a/javascript/components/annotations/Annotation.tsx
+++ b/javascript/components/annotations/Annotation.tsx
@@ -127,7 +127,10 @@ const Annotation = React.forwardRef(
const children = [];
const symbolStyle: SymbolLayerStyleProps | undefined = props.icon
- ? { ...props.style, iconImage: props.icon }
+ ? {
+ ...props.style,
+ iconImage: typeof props.icon === "string" ? props.icon : undefined,
+ }
: undefined;
if (symbolStyle) {
diff --git a/javascript/utils/MaplibreStyles.d.ts b/javascript/utils/MaplibreStyles.d.ts
index 1bf803e06..6d121642f 100644
--- a/javascript/utils/MaplibreStyles.d.ts
+++ b/javascript/utils/MaplibreStyles.d.ts
@@ -132,21 +132,21 @@ export type Value =
| T
| Expression;
-enum VisibilityEnum {
+export enum VisibilityEnum {
/** The layer is shown. */
Visible = "visible",
/** The layer is not shown. */
None = "none",
}
type VisibilityEnumValues = "visible" | "none";
-enum FillTranslateAnchorEnum {
+export enum FillTranslateAnchorEnum {
/** The fill is translated relative to the map. */
Map = "map",
/** The fill is translated relative to the viewport. */
Viewport = "viewport",
}
type FillTranslateAnchorEnumValues = "map" | "viewport";
-enum LineCapEnum {
+export enum LineCapEnum {
/** A cap with a squared-off end which is drawn to the exact endpoint of the line. */
Butt = "butt",
/** A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
@@ -155,7 +155,7 @@ enum LineCapEnum {
Square = "square",
}
type LineCapEnumValues = "butt" | "round" | "square";
-enum LineJoinEnum {
+export enum LineJoinEnum {
/** A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width. */
Bevel = "bevel",
/** A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line. */
@@ -164,14 +164,14 @@ enum LineJoinEnum {
Miter = "miter",
}
type LineJoinEnumValues = "bevel" | "round" | "miter";
-enum LineTranslateAnchorEnum {
+export enum LineTranslateAnchorEnum {
/** The line is translated relative to the map. */
Map = "map",
/** The line is translated relative to the viewport. */
Viewport = "viewport",
}
type LineTranslateAnchorEnumValues = "map" | "viewport";
-enum SymbolPlacementEnum {
+export enum SymbolPlacementEnum {
/** The label is placed at the point where the geometry is located. */
Point = "point",
/** The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. */
@@ -180,7 +180,7 @@ enum SymbolPlacementEnum {
LineCenter = "line-center",
}
type SymbolPlacementEnumValues = "point" | "line" | "line-center";
-enum SymbolZOrderEnum {
+export enum SymbolZOrderEnum {
/** Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. */
Auto = "auto",
/** Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`. */
@@ -189,7 +189,7 @@ enum SymbolZOrderEnum {
Source = "source",
}
type SymbolZOrderEnumValues = "auto" | "viewport-y" | "source";
-enum IconRotationAlignmentEnum {
+export enum IconRotationAlignmentEnum {
/** When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line. */
Map = "map",
/** Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
@@ -198,7 +198,7 @@ enum IconRotationAlignmentEnum {
Auto = "auto",
}
type IconRotationAlignmentEnumValues = "map" | "viewport" | "auto";
-enum IconTextFitEnum {
+export enum IconTextFitEnum {
/** The icon is displayed at its intrinsic aspect ratio. */
None = "none",
/** The icon is scaled in the x-dimension to fit the width of the text. */
@@ -209,7 +209,7 @@ enum IconTextFitEnum {
Both = "both",
}
type IconTextFitEnumValues = "none" | "width" | "height" | "both";
-enum IconAnchorEnum {
+export enum IconAnchorEnum {
/** The center of the icon is placed closest to the anchor. */
Center = "center",
/** The left side of the icon is placed closest to the anchor. */
@@ -239,7 +239,7 @@ type IconAnchorEnumValues =
| "top-right"
| "bottom-left"
| "bottom-right";
-enum IconPitchAlignmentEnum {
+export enum IconPitchAlignmentEnum {
/** The icon is aligned to the plane of the map. */
Map = "map",
/** The icon is aligned to the plane of the viewport. */
@@ -248,7 +248,7 @@ enum IconPitchAlignmentEnum {
Auto = "auto",
}
type IconPitchAlignmentEnumValues = "map" | "viewport" | "auto";
-enum TextPitchAlignmentEnum {
+export enum TextPitchAlignmentEnum {
/** The text is aligned to the plane of the map. */
Map = "map",
/** The text is aligned to the plane of the viewport. */
@@ -257,7 +257,7 @@ enum TextPitchAlignmentEnum {
Auto = "auto",
}
type TextPitchAlignmentEnumValues = "map" | "viewport" | "auto";
-enum TextRotationAlignmentEnum {
+export enum TextRotationAlignmentEnum {
/** When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line. */
Map = "map",
/** Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`. */
@@ -272,7 +272,7 @@ type TextRotationAlignmentEnumValues =
| "viewport"
| "viewport-glyph"
| "auto";
-enum TextJustifyEnum {
+export enum TextJustifyEnum {
/** The text is aligned towards the anchor position. */
Auto = "auto",
/** The text is aligned to the left. */
@@ -283,7 +283,7 @@ enum TextJustifyEnum {
Right = "right",
}
type TextJustifyEnumValues = "auto" | "left" | "center" | "right";
-enum TextVariableAnchorEnum {
+export enum TextVariableAnchorEnum {
/** The center of the text is placed closest to the anchor. */
Center = "center",
/** The left side of the text is placed closest to the anchor. */
@@ -313,7 +313,7 @@ type TextVariableAnchorEnumValues =
| "top-right"
| "bottom-left"
| "bottom-right";
-enum TextAnchorEnum {
+export enum TextAnchorEnum {
/** The center of the text is placed closest to the anchor. */
Center = "center",
/** The left side of the text is placed closest to the anchor. */
@@ -343,14 +343,14 @@ type TextAnchorEnumValues =
| "top-right"
| "bottom-left"
| "bottom-right";
-enum TextWritingModeEnum {
+export enum TextWritingModeEnum {
/** If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally. */
Horizontal = "horizontal",
/** If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically. */
Vertical = "vertical",
}
type TextWritingModeEnumValues = "horizontal" | "vertical";
-enum TextTransformEnum {
+export enum TextTransformEnum {
/** The text is not altered. */
None = "none",
/** Forces all letters to be displayed in uppercase. */
@@ -359,63 +359,63 @@ enum TextTransformEnum {
Lowercase = "lowercase",
}
type TextTransformEnumValues = "none" | "uppercase" | "lowercase";
-enum IconTranslateAnchorEnum {
+export enum IconTranslateAnchorEnum {
/** Icons are translated relative to the map. */
Map = "map",
/** Icons are translated relative to the viewport. */
Viewport = "viewport",
}
type IconTranslateAnchorEnumValues = "map" | "viewport";
-enum TextTranslateAnchorEnum {
+export enum TextTranslateAnchorEnum {
/** The text is translated relative to the map. */
Map = "map",
/** The text is translated relative to the viewport. */
Viewport = "viewport",
}
type TextTranslateAnchorEnumValues = "map" | "viewport";
-enum CircleTranslateAnchorEnum {
+export enum CircleTranslateAnchorEnum {
/** The circle is translated relative to the map. */
Map = "map",
/** The circle is translated relative to the viewport. */
Viewport = "viewport",
}
type CircleTranslateAnchorEnumValues = "map" | "viewport";
-enum CirclePitchScaleEnum {
+export enum CirclePitchScaleEnum {
/** Circles are scaled according to their apparent distance to the camera. */
Map = "map",
/** Circles are not scaled. */
Viewport = "viewport",
}
type CirclePitchScaleEnumValues = "map" | "viewport";
-enum CirclePitchAlignmentEnum {
+export enum CirclePitchAlignmentEnum {
/** The circle is aligned to the plane of the map. */
Map = "map",
/** The circle is aligned to the plane of the viewport. */
Viewport = "viewport",
}
type CirclePitchAlignmentEnumValues = "map" | "viewport";
-enum FillExtrusionTranslateAnchorEnum {
+export enum FillExtrusionTranslateAnchorEnum {
/** The fill extrusion is translated relative to the map. */
Map = "map",
/** The fill extrusion is translated relative to the viewport. */
Viewport = "viewport",
}
type FillExtrusionTranslateAnchorEnumValues = "map" | "viewport";
-enum RasterResamplingEnum {
+export enum RasterResamplingEnum {
/** (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled */
Linear = "linear",
/** Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled */
Nearest = "nearest",
}
type RasterResamplingEnumValues = "linear" | "nearest";
-enum HillshadeIlluminationAnchorEnum {
+export enum HillshadeIlluminationAnchorEnum {
/** The hillshade illumination is relative to the north direction. */
Map = "map",
/** The hillshade illumination is relative to the top of the viewport. */
Viewport = "viewport",
}
type HillshadeIlluminationAnchorEnumValues = "map" | "viewport";
-enum AnchorEnum {
+export enum AnchorEnum {
/** The position of the light source is aligned to the rotation of the map. */
Map = "map",
/** The position of the light source is aligned to the rotation of the viewport. */
@@ -429,19 +429,19 @@ export interface FillLayerStyleProps {
/**
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
*/
- fillSortKey?: Value;
+ fillSortKey?: number;
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* Whether or not the fill should be antialiased.
*/
- fillAntialias?: Value;
+ fillAntialias?: boolean;
/**
* The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1px stroke around the fill, if the stroke is used.
*/
- fillOpacity?: Value;
+ fillOpacity?: number;
/**
* The transition affecting any changes to this layer’s fillOpacity property.
@@ -452,7 +452,7 @@ export interface FillLayerStyleProps {
*
* @disabledBy fillPattern
*/
- fillColor?: Value;
+ fillColor?: string;
/**
* The transition affecting any changes to this layer’s fillColor property.
@@ -463,7 +463,7 @@ export interface FillLayerStyleProps {
*
* @disabledBy fillPattern
*/
- fillOutlineColor?: Value;
+ fillOutlineColor?: string;
/**
* The transition affecting any changes to this layer’s fillOutlineColor property.
@@ -472,7 +472,7 @@ export interface FillLayerStyleProps {
/**
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
- fillTranslate?: Value;
+ fillTranslate?: any[];
/**
* The transition affecting any changes to this layer’s fillTranslate property.
@@ -483,14 +483,11 @@ export interface FillLayerStyleProps {
*
* @requires fillTranslate
*/
- fillTranslateAnchor?: Value<
- Enum,
- ["zoom"]
- >;
+ fillTranslateAnchor?: "map" | "viewport";
/**
* Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
*/
- fillPattern?: Value;
+ fillPattern?: string;
/**
* The transition affecting any changes to this layer’s fillPattern property.
@@ -501,31 +498,31 @@ export interface LineLayerStyleProps {
/**
* The display of line endings.
*/
- lineCap?: Value, ["zoom"]>;
+ lineCap?: "butt" | "round" | "square";
/**
* The display of lines when joining.
*/
- lineJoin?: Value, ["zoom", "feature"]>;
+ lineJoin?: "bevel" | "round" | "miter";
/**
* Used to automatically convert miter joins to bevel joins for sharp angles.
*/
- lineMiterLimit?: Value;
+ lineMiterLimit?: number;
/**
* Used to automatically convert round joins to miter joins for shallow angles.
*/
- lineRoundLimit?: Value;
+ lineRoundLimit?: number;
/**
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
*/
- lineSortKey?: Value;
+ lineSortKey?: number;
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The opacity at which the line will be drawn.
*/
- lineOpacity?: Value;
+ lineOpacity?: number;
/**
* The transition affecting any changes to this layer’s lineOpacity property.
@@ -536,7 +533,7 @@ export interface LineLayerStyleProps {
*
* @disabledBy linePattern
*/
- lineColor?: Value;
+ lineColor?: string;
/**
* The transition affecting any changes to this layer’s lineColor property.
@@ -545,7 +542,7 @@ export interface LineLayerStyleProps {
/**
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
- lineTranslate?: Value;
+ lineTranslate?: any[];
/**
* The transition affecting any changes to this layer’s lineTranslate property.
@@ -556,14 +553,11 @@ export interface LineLayerStyleProps {
*
* @requires lineTranslate
*/
- lineTranslateAnchor?: Value<
- Enum,
- ["zoom"]
- >;
+ lineTranslateAnchor?: "map" | "viewport";
/**
* Stroke thickness.
*/
- lineWidth?: Value;
+ lineWidth?: number;
/**
* The transition affecting any changes to this layer’s lineWidth property.
@@ -572,7 +566,7 @@ export interface LineLayerStyleProps {
/**
* Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
*/
- lineGapWidth?: Value;
+ lineGapWidth?: number;
/**
* The transition affecting any changes to this layer’s lineGapWidth property.
@@ -581,7 +575,7 @@ export interface LineLayerStyleProps {
/**
* The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
*/
- lineOffset?: Value;
+ lineOffset?: number;
/**
* The transition affecting any changes to this layer’s lineOffset property.
@@ -590,7 +584,7 @@ export interface LineLayerStyleProps {
/**
* Blur applied to the line, in pixels.
*/
- lineBlur?: Value;
+ lineBlur?: number;
/**
* The transition affecting any changes to this layer’s lineBlur property.
@@ -601,7 +595,7 @@ export interface LineLayerStyleProps {
*
* @disabledBy linePattern
*/
- lineDasharray?: Value;
+ lineDasharray?: any[];
/**
* The transition affecting any changes to this layer’s lineDasharray property.
@@ -610,7 +604,7 @@ export interface LineLayerStyleProps {
/**
* Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
*/
- linePattern?: Value;
+ linePattern?: string;
/**
* The transition affecting any changes to this layer’s linePattern property.
@@ -621,35 +615,29 @@ export interface LineLayerStyleProps {
*
* @disabledBy lineDasharray, linePattern
*/
- lineGradient?: Value;
+ lineGradient?: string;
}
export interface SymbolLayerStyleProps {
/**
* Label placement relative to its geometry.
*/
- symbolPlacement?: Value<
- Enum,
- ["zoom"]
- >;
+ symbolPlacement?: "point" | "line" | "line-center";
/**
* Distance between two symbol anchors.
*/
- symbolSpacing?: Value;
+ symbolSpacing?: number;
/**
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
*/
- symbolAvoidEdges?: Value;
+ symbolAvoidEdges?: boolean;
/**
* Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `iconAllowOverlap` or `textAllowOverlap` is `false`, features with a lower sort key will have priority during placement. When `iconAllowOverlap` or `textAllowOverlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
*/
- symbolSortKey?: Value;
+ symbolSortKey?: number;
/**
* Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.
*/
- symbolZOrder?: Value<
- Enum,
- ["zoom"]
- >;
+ symbolZOrder?: "auto" | "viewport-y" | "source";
/**
* If true, the icon will be visible even if it collides with other previously drawn symbols.
*
@@ -657,168 +645,156 @@ export interface SymbolLayerStyleProps {
*
* @disabledBy iconOverlap
*/
- iconAllowOverlap?: Value;
+ iconAllowOverlap?: boolean;
/**
* If true, other symbols can be visible even if they collide with the icon.
*
* @requires iconImage
*/
- iconIgnorePlacement?: Value;
+ iconIgnorePlacement?: boolean;
/**
* If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
*
* @requires iconImage, textField
*/
- iconOptional?: Value;
+ iconOptional?: boolean;
/**
* In combination with `symbolPlacement`, determines the rotation behavior of icons.
*
* @requires iconImage
*/
- iconRotationAlignment?: Value<
- Enum,
- ["zoom"]
- >;
+ iconRotationAlignment?: "map" | "viewport" | "auto";
/**
* Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `iconSize`. 1 is the original size; 3 triples the size of the image.
*
* @requires iconImage
*/
- iconSize?: Value;
+ iconSize?: number;
/**
* Scales the icon to fit around the associated text.
*
* @requires iconImage, textField
*/
- iconTextFit?: Value, ["zoom"]>;
+ iconTextFit?: "none" | "width" | "height" | "both";
/**
* Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
*
* @requires iconImage, textField
*/
- iconTextFitPadding?: Value;
+ iconTextFitPadding?: any[];
/**
* Name of image in sprite to use for drawing an image background.
*/
- iconImage?: Value;
+ iconImage?: string;
/**
* Rotates the icon clockwise.
*
* @requires iconImage
*/
- iconRotate?: Value;
+ iconRotate?: number;
/**
- * 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.
+ * Size of additional area round the icon bounding box used for detecting symbol collisions.
*
* @requires iconImage
*/
- iconPadding?: Value;
+ iconPadding?: any[];
/**
* If true, the icon may be flipped to prevent it from being rendered upsideDown.
*
* @requires iconImage
*/
- iconKeepUpright?: Value;
+ iconKeepUpright?: boolean;
/**
* Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `iconSize` to obtain the final offset in pixels. When combined with `iconRotate` the offset will be as if the rotated direction was up.
*
* @requires iconImage
*/
- iconOffset?: Value;
+ iconOffset?: any[];
/**
* Part of the icon placed closest to the anchor.
*
* @requires iconImage
*/
- iconAnchor?: Value<
- Enum,
- ["zoom", "feature"]
- >;
+ iconAnchor?:
+ | "center"
+ | "left"
+ | "right"
+ | "top"
+ | "bottom"
+ | "top-left"
+ | "top-right"
+ | "bottom-left"
+ | "bottom-right";
/**
* Orientation of icon when map is pitched.
*
* @requires iconImage
*/
- iconPitchAlignment?: Value<
- Enum,
- ["zoom"]
- >;
+ iconPitchAlignment?: "map" | "viewport" | "auto";
/**
* Orientation of text when map is pitched.
*
* @requires textField
*/
- textPitchAlignment?: Value<
- Enum,
- ["zoom"]
- >;
+ textPitchAlignment?: "map" | "viewport" | "auto";
/**
* In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
*
* @requires textField
*/
- textRotationAlignment?: Value<
- Enum,
- ["zoom"]
- >;
+ textRotationAlignment?: "map" | "viewport" | "viewport-glyph" | "auto";
/**
* Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
*/
- textField?: Value;
+ textField?: string;
/**
* Font stack to use for displaying text.
*
* @requires textField
*/
- textFont?: Value;
+ textFont?: any[];
/**
* Font size.
*
* @requires textField
*/
- textSize?: Value;
+ textSize?: number;
/**
* The maximum line width for text wrapping.
*
* @requires textField
*/
- textMaxWidth?: Value;
+ textMaxWidth?: number;
/**
* Text leading value for multiLine text.
*
* @requires textField
*/
- textLineHeight?: Value;
+ textLineHeight?: number;
/**
* Text tracking amount.
*
* @requires textField
*/
- textLetterSpacing?: Value;
+ textLetterSpacing?: number;
/**
* Text justification options.
*
* @requires textField
*/
- textJustify?: Value<
- Enum,
- ["zoom", "feature"]
- >;
+ textJustify?: "auto" | "left" | "center" | "right";
/**
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `textVariableAnchor`, which defaults to using the twoDimensional `textOffset` if present.
*
* @requires textField
*/
- textRadialOffset?: Value;
+ textRadialOffset?: number;
/**
* To increase the chance of placing highPriority labels on the map, you can provide an array of `textAnchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `textJustify: auto` to choose justification based on anchor position. To apply an offset, use the `textRadialOffset` or the twoDimensional `textOffset`.
*
* @requires textField
*/
- textVariableAnchor?: Value<
- Enum[],
- ["zoom"]
- >;
+ textVariableAnchor?: any[];
/**
* Part of the text placed closest to the anchor.
*
@@ -826,52 +802,52 @@ export interface SymbolLayerStyleProps {
*
* @disabledBy textVariableAnchor
*/
- textAnchor?: Value<
- Enum,
- ["zoom", "feature"]
- >;
+ textAnchor?:
+ | "center"
+ | "left"
+ | "right"
+ | "top"
+ | "bottom"
+ | "top-left"
+ | "top-right"
+ | "bottom-left"
+ | "bottom-right";
/**
* Maximum angle change between adjacent characters.
*
* @requires textField
*/
- textMaxAngle?: Value;
+ textMaxAngle?: number;
/**
* The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
*
* @requires textField
*/
- textWritingMode?: Value<
- Enum[],
- ["zoom"]
- >;
+ textWritingMode?: any[];
/**
* Rotates the text clockwise.
*
* @requires textField
*/
- textRotate?: Value;
+ textRotate?: number;
/**
* Size of the additional area around the text bounding box used for detecting symbol collisions.
*
* @requires textField
*/
- textPadding?: Value;
+ textPadding?: number;
/**
* If true, the text may be flipped vertically to prevent it from being rendered upsideDown.
*
* @requires textField
*/
- textKeepUpright?: Value;
+ textKeepUpright?: boolean;
/**
* Specifies how to capitalize text, similar to the CSS `textTransform` property.
*
* @requires textField
*/
- textTransform?: Value<
- Enum,
- ["zoom", "feature"]
- >;
+ textTransform?: "none" | "uppercase" | "lowercase";
/**
* Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with textVariableAnchor, input values will be taken as absolute values. Offsets along the x and yAxis will be applied automatically based on the anchor position.
*
@@ -879,7 +855,7 @@ export interface SymbolLayerStyleProps {
*
* @disabledBy textRadialOffset
*/
- textOffset?: Value;
+ textOffset?: any[];
/**
* If true, the text will be visible even if it collides with other previously drawn symbols.
*
@@ -887,40 +863,40 @@ export interface SymbolLayerStyleProps {
*
* @disabledBy textOverlap
*/
- textAllowOverlap?: Value;
+ textAllowOverlap?: boolean;
/**
* If true, other symbols can be visible even if they collide with the text.
*
* @requires textField
*/
- textIgnorePlacement?: Value;
+ textIgnorePlacement?: boolean;
/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*
* @requires textField, iconImage
*/
- textOptional?: Value;
+ textOptional?: boolean;
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The opacity at which the icon will be drawn.
*
* @requires iconImage
*/
- iconOpacity?: Value;
+ iconOpacity?: number;
/**
* The transition affecting any changes to this layer’s iconOpacity property.
*/
iconOpacityTransition?: Transition;
/**
- * The color of the icon. This can only be used with sdf icons.
+ * The color of the icon. This can only be used with SDF icons.
*
* @requires iconImage
*/
- iconColor?: Value;
+ iconColor?: string;
/**
* The transition affecting any changes to this layer’s iconColor property.
@@ -931,18 +907,20 @@ export interface SymbolLayerStyleProps {
*
* @requires iconImage
*/
- iconHaloColor?: Value;
+ iconHaloColor?: string;
/**
* The transition affecting any changes to this layer’s iconHaloColor property.
*/
iconHaloColorTransition?: Transition;
/**
- * Distance of halo to the icon outline.
- *
- * @requires iconImage
- */
- iconHaloWidth?: Value;
+ * Distance of halo to the icon outline.
+
+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.
+ *
+ * @requires iconImage
+ */
+ iconHaloWidth?: number;
/**
* The transition affecting any changes to this layer’s iconHaloWidth property.
@@ -953,7 +931,7 @@ export interface SymbolLayerStyleProps {
*
* @requires iconImage
*/
- iconHaloBlur?: Value;
+ iconHaloBlur?: number;
/**
* The transition affecting any changes to this layer’s iconHaloBlur property.
@@ -964,7 +942,7 @@ export interface SymbolLayerStyleProps {
*
* @requires iconImage
*/
- iconTranslate?: Value;
+ iconTranslate?: any[];
/**
* The transition affecting any changes to this layer’s iconTranslate property.
@@ -975,16 +953,13 @@ export interface SymbolLayerStyleProps {
*
* @requires iconImage, iconTranslate
*/
- iconTranslateAnchor?: Value<
- Enum,
- ["zoom"]
- >;
+ iconTranslateAnchor?: "map" | "viewport";
/**
* The opacity at which the text will be drawn.
*
* @requires textField
*/
- textOpacity?: Value;
+ textOpacity?: number;
/**
* The transition affecting any changes to this layer’s textOpacity property.
@@ -995,7 +970,7 @@ export interface SymbolLayerStyleProps {
*
* @requires textField
*/
- textColor?: Value;
+ textColor?: string;
/**
* The transition affecting any changes to this layer’s textColor property.
@@ -1006,7 +981,7 @@ export interface SymbolLayerStyleProps {
*
* @requires textField
*/
- textHaloColor?: Value;
+ textHaloColor?: string;
/**
* The transition affecting any changes to this layer’s textHaloColor property.
@@ -1017,7 +992,7 @@ export interface SymbolLayerStyleProps {
*
* @requires textField
*/
- textHaloWidth?: Value;
+ textHaloWidth?: number;
/**
* The transition affecting any changes to this layer’s textHaloWidth property.
@@ -1028,7 +1003,7 @@ export interface SymbolLayerStyleProps {
*
* @requires textField
*/
- textHaloBlur?: Value;
+ textHaloBlur?: number;
/**
* The transition affecting any changes to this layer’s textHaloBlur property.
@@ -1039,7 +1014,7 @@ export interface SymbolLayerStyleProps {
*
* @requires textField
*/
- textTranslate?: Value;
+ textTranslate?: any[];
/**
* The transition affecting any changes to this layer’s textTranslate property.
@@ -1050,24 +1025,21 @@ export interface SymbolLayerStyleProps {
*
* @requires textField, textTranslate
*/
- textTranslateAnchor?: Value<
- Enum,
- ["zoom"]
- >;
+ textTranslateAnchor?: "map" | "viewport";
}
export interface CircleLayerStyleProps {
/**
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
*/
- circleSortKey?: Value;
+ circleSortKey?: number;
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* Circle radius.
*/
- circleRadius?: Value;
+ circleRadius?: number;
/**
* The transition affecting any changes to this layer’s circleRadius property.
@@ -1076,7 +1048,7 @@ export interface CircleLayerStyleProps {
/**
* The fill color of the circle.
*/
- circleColor?: Value;
+ circleColor?: string;
/**
* The transition affecting any changes to this layer’s circleColor property.
@@ -1085,7 +1057,7 @@ export interface CircleLayerStyleProps {
/**
* Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
*/
- circleBlur?: Value;
+ circleBlur?: number;
/**
* The transition affecting any changes to this layer’s circleBlur property.
@@ -1094,7 +1066,7 @@ export interface CircleLayerStyleProps {
/**
* The opacity at which the circle will be drawn.
*/
- circleOpacity?: Value;
+ circleOpacity?: number;
/**
* The transition affecting any changes to this layer’s circleOpacity property.
@@ -1103,7 +1075,7 @@ export interface CircleLayerStyleProps {
/**
* The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
*/
- circleTranslate?: Value;
+ circleTranslate?: any[];
/**
* The transition affecting any changes to this layer’s circleTranslate property.
@@ -1114,28 +1086,19 @@ export interface CircleLayerStyleProps {
*
* @requires circleTranslate
*/
- circleTranslateAnchor?: Value<
- Enum,
- ["zoom"]
- >;
+ circleTranslateAnchor?: "map" | "viewport";
/**
* Controls the scaling behavior of the circle when the map is pitched.
*/
- circlePitchScale?: Value<
- Enum,
- ["zoom"]
- >;
+ circlePitchScale?: "map" | "viewport";
/**
* Orientation of circle when map is pitched.
*/
- circlePitchAlignment?: Value<
- Enum,
- ["zoom"]
- >;
+ circlePitchAlignment?: "map" | "viewport";
/**
* The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.
*/
- circleStrokeWidth?: Value;
+ circleStrokeWidth?: number;
/**
* The transition affecting any changes to this layer’s circleStrokeWidth property.
@@ -1144,7 +1107,7 @@ export interface CircleLayerStyleProps {
/**
* The stroke color of the circle.
*/
- circleStrokeColor?: Value;
+ circleStrokeColor?: string;
/**
* The transition affecting any changes to this layer’s circleStrokeColor property.
@@ -1153,7 +1116,7 @@ export interface CircleLayerStyleProps {
/**
* The opacity of the circle's stroke.
*/
- circleStrokeOpacity?: Value;
+ circleStrokeOpacity?: number;
/**
* The transition affecting any changes to this layer’s circleStrokeOpacity property.
@@ -1164,11 +1127,11 @@ export interface HeatmapLayerStyleProps {
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
*/
- heatmapRadius?: Value;
+ heatmapRadius?: number;
/**
* The transition affecting any changes to this layer’s heatmapRadius property.
@@ -1177,11 +1140,11 @@ export interface HeatmapLayerStyleProps {
/**
* A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.
*/
- heatmapWeight?: Value;
+ heatmapWeight?: number;
/**
* Similar to `heatmapWeight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
*/
- heatmapIntensity?: Value;
+ heatmapIntensity?: number;
/**
* The transition affecting any changes to this layer’s heatmapIntensity property.
@@ -1190,11 +1153,11 @@ export interface HeatmapLayerStyleProps {
/**
* Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmapDensity"]` as input.
*/
- heatmapColor?: Value;
+ heatmapColor?: string;
/**
* The global opacity at which the heatmap layer will be drawn.
*/
- heatmapOpacity?: Value;
+ heatmapOpacity?: number;
/**
* The transition affecting any changes to this layer’s heatmapOpacity property.
@@ -1205,11 +1168,11 @@ export interface FillExtrusionLayerStyleProps {
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.
*/
- fillExtrusionOpacity?: Value;
+ fillExtrusionOpacity?: number;
/**
* The transition affecting any changes to this layer’s fillExtrusionOpacity property.
@@ -1220,7 +1183,7 @@ export interface FillExtrusionLayerStyleProps {
*
* @disabledBy fillExtrusionPattern
*/
- fillExtrusionColor?: Value;
+ fillExtrusionColor?: string;
/**
* The transition affecting any changes to this layer’s fillExtrusionColor property.
@@ -1229,7 +1192,7 @@ export interface FillExtrusionLayerStyleProps {
/**
* The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.
*/
- fillExtrusionTranslate?: Value;
+ fillExtrusionTranslate?: any[];
/**
* The transition affecting any changes to this layer’s fillExtrusionTranslate property.
@@ -1240,17 +1203,11 @@ export interface FillExtrusionLayerStyleProps {
*
* @requires fillExtrusionTranslate
*/
- fillExtrusionTranslateAnchor?: Value<
- Enum<
- FillExtrusionTranslateAnchorEnum,
- FillExtrusionTranslateAnchorEnumValues
- >,
- ["zoom"]
- >;
+ fillExtrusionTranslateAnchor?: "map" | "viewport";
/**
* Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
*/
- fillExtrusionPattern?: Value;
+ fillExtrusionPattern?: string;
/**
* The transition affecting any changes to this layer’s fillExtrusionPattern property.
@@ -1259,7 +1216,7 @@ export interface FillExtrusionLayerStyleProps {
/**
* The height with which to extrude this layer.
*/
- fillExtrusionHeight?: Value;
+ fillExtrusionHeight?: number;
/**
* The transition affecting any changes to this layer’s fillExtrusionHeight property.
@@ -1270,22 +1227,26 @@ export interface FillExtrusionLayerStyleProps {
*
* @requires fillExtrusionHeight
*/
- fillExtrusionBase?: Value;
+ fillExtrusionBase?: number;
/**
* The transition affecting any changes to this layer’s fillExtrusionBase property.
*/
fillExtrusionBaseTransition?: Transition;
+ /**
+ * Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
+ */
+ fillExtrusionVerticalGradient?: boolean;
}
export interface RasterLayerStyleProps {
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The opacity at which the image will be drawn.
*/
- rasterOpacity?: Value;
+ rasterOpacity?: number;
/**
* The transition affecting any changes to this layer’s rasterOpacity property.
@@ -1294,7 +1255,7 @@ export interface RasterLayerStyleProps {
/**
* Rotates hues around the color wheel.
*/
- rasterHueRotate?: Value;
+ rasterHueRotate?: number;
/**
* The transition affecting any changes to this layer’s rasterHueRotate property.
@@ -1303,7 +1264,7 @@ export interface RasterLayerStyleProps {
/**
* Increase or reduce the brightness of the image. The value is the minimum brightness.
*/
- rasterBrightnessMin?: Value;
+ rasterBrightnessMin?: number;
/**
* The transition affecting any changes to this layer’s rasterBrightnessMin property.
@@ -1312,7 +1273,7 @@ export interface RasterLayerStyleProps {
/**
* Increase or reduce the brightness of the image. The value is the maximum brightness.
*/
- rasterBrightnessMax?: Value;
+ rasterBrightnessMax?: number;
/**
* The transition affecting any changes to this layer’s rasterBrightnessMax property.
@@ -1321,7 +1282,7 @@ export interface RasterLayerStyleProps {
/**
* Increase or reduce the saturation of the image.
*/
- rasterSaturation?: Value;
+ rasterSaturation?: number;
/**
* The transition affecting any changes to this layer’s rasterSaturation property.
@@ -1330,7 +1291,7 @@ export interface RasterLayerStyleProps {
/**
* Increase or reduce the contrast of the image.
*/
- rasterContrast?: Value;
+ rasterContrast?: number;
/**
* The transition affecting any changes to this layer’s rasterContrast property.
@@ -1339,38 +1300,29 @@ export interface RasterLayerStyleProps {
/**
* The resampling/interpolation method to use for overscaling, also known as texture magnification filter
*/
- rasterResampling?: Value<
- Enum,
- ["zoom"]
- >;
+ rasterResampling?: "linear" | "nearest";
/**
- * Fade duration when a new tile is added.
+ * Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
*/
- rasterFadeDuration?: Value;
+ rasterFadeDuration?: number;
}
export interface HillshadeLayerStyleProps {
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshadeIlluminationAnchor` is set to `viewport` and due north if `hillshadeIlluminationAnchor` is set to `map`.
*/
- hillshadeIlluminationDirection?: Value;
+ hillshadeIlluminationDirection?: number;
/**
* Direction of light source when map is rotated.
*/
- hillshadeIlluminationAnchor?: Value<
- Enum<
- HillshadeIlluminationAnchorEnum,
- HillshadeIlluminationAnchorEnumValues
- >,
- ["zoom"]
- >;
+ hillshadeIlluminationAnchor?: "map" | "viewport";
/**
* Intensity of the hillshade
*/
- hillshadeExaggeration?: Value;
+ hillshadeExaggeration?: number;
/**
* The transition affecting any changes to this layer’s hillshadeExaggeration property.
@@ -1379,7 +1331,7 @@ export interface HillshadeLayerStyleProps {
/**
* The shading color of areas that face away from the light source.
*/
- hillshadeShadowColor?: Value;
+ hillshadeShadowColor?: string;
/**
* The transition affecting any changes to this layer’s hillshadeShadowColor property.
@@ -1388,7 +1340,7 @@ export interface HillshadeLayerStyleProps {
/**
* The shading color of areas that faces towards the light source.
*/
- hillshadeHighlightColor?: Value;
+ hillshadeHighlightColor?: string;
/**
* The transition affecting any changes to this layer’s hillshadeHighlightColor property.
@@ -1397,7 +1349,7 @@ export interface HillshadeLayerStyleProps {
/**
* The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
*/
- hillshadeAccentColor?: Value;
+ hillshadeAccentColor?: string;
/**
* The transition affecting any changes to this layer’s hillshadeAccentColor property.
@@ -1408,13 +1360,13 @@ export interface BackgroundLayerStyleProps {
/**
* Whether this layer is displayed.
*/
- visibility?: Enum;
+ visibility?: "visible" | "none";
/**
* The color with which the background will be drawn.
*
* @disabledBy backgroundPattern
*/
- backgroundColor?: Value;
+ backgroundColor?: string;
/**
* The transition affecting any changes to this layer’s backgroundColor property.
@@ -1423,7 +1375,7 @@ export interface BackgroundLayerStyleProps {
/**
* Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
*/
- backgroundPattern?: Value;
+ backgroundPattern?: string;
/**
* The transition affecting any changes to this layer’s backgroundPattern property.
@@ -1432,7 +1384,7 @@ export interface BackgroundLayerStyleProps {
/**
* The opacity at which the background will be drawn.
*/
- backgroundOpacity?: Value;
+ backgroundOpacity?: number;
/**
* The transition affecting any changes to this layer’s backgroundOpacity property.
@@ -1443,11 +1395,11 @@ export interface LightLayerStyleProps {
/**
* Whether extruded geometries are lit relative to the map or viewport.
*/
- anchor?: Value, ["zoom"]>;
+ anchor?: "map" | "viewport";
/**
* Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).
*/
- position?: Value;
+ position?: any[];
/**
* The transition affecting any changes to this layer’s position property.
@@ -1456,7 +1408,7 @@ export interface LightLayerStyleProps {
/**
* Color tint for lighting extruded geometries.
*/
- color?: Value;
+ color?: string;
/**
* The transition affecting any changes to this layer’s color property.
@@ -1465,7 +1417,7 @@ export interface LightLayerStyleProps {
/**
* Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
*/
- intensity?: Value;
+ intensity?: number;
/**
* The transition affecting any changes to this layer’s intensity property.
diff --git a/javascript/utils/styleMap.ts b/javascript/utils/styleMap.ts
index 4a7843da2..b696f2ac6 100644
--- a/javascript/utils/styleMap.ts
+++ b/javascript/utils/styleMap.ts
@@ -178,6 +178,7 @@ const styleMap = {
fillExtrusionHeightTransition: StyleTypes.Transition,
fillExtrusionBase: StyleTypes.Constant,
fillExtrusionBaseTransition: StyleTypes.Transition,
+ fillExtrusionVerticalGradient: StyleTypes.Constant,
rasterOpacity: StyleTypes.Constant,
rasterOpacityTransition: StyleTypes.Transition,
diff --git a/package.json b/package.json
index 202a953a1..ee073a2e8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@maplibre/maplibre-react-native",
"description": "A MapLibre GL Native plugin for creating maps in React Native",
- "version": "10.0.0-alpha.18",
+ "version": "10.0.0-alpha.19",
"publishConfig": {
"access": "public"
},
@@ -22,8 +22,8 @@
},
"scripts": {
"fetch:style:spec": "./scripts/download-style-spec.sh",
- "generate": "yarn node ./scripts/autogenerate",
- "test": "npm run lint && npm run unittest",
+ "generate": "yarn fetch:style:spec && yarn node ./scripts/autogenerate",
+ "test": "yarn lint && yarn unittest",
"unittest": "jest",
"unittest:single": "jest --testNamePattern",
"lint": "eslint .",
diff --git a/scripts/autogenHelpers/globals.js b/scripts/autogenHelpers/globals.js
index 5c161dee5..c89941a22 100644
--- a/scripts/autogenHelpers/globals.js
+++ b/scripts/autogenHelpers/globals.js
@@ -263,73 +263,30 @@ global.getEnums = function (layers) {
};
global.dtsInterfaceType = function (prop) {
- let propTypes = [];
-
- if (prop.name.indexOf('Translate') !== -1 && prop.type != 'enum') {
- propTypes.push('Translation');
- } else if (prop.type === 'color') {
- propTypes.push('string');
- // propTypes.push('ConstantPropType');
- } else if (prop.type === 'array') {
- switch (prop.value) {
- case 'number':
- propTypes.push('number[]');
- break;
- case 'boolean':
- propTypes.push('boolean[]');
- break;
- case 'string':
- propTypes.push('string[]');
- break;
- case 'enum':
- propTypes.push(
- `Enum<${pascelCase(prop.name)}Enum, ${pascelCase(
- prop.name,
- )}EnumValues>[]`,
- );
- break;
- }
- // propTypes.push('ConstantPropType');
- } else if (prop.type === 'number') {
- propTypes.push('number');
- } else if (prop.type === 'enum') {
- propTypes.push(
- `Enum<${pascelCase(prop.name)}Enum, ${pascelCase(prop.name)}EnumValues>`,
- );
- } else if (prop.type === 'boolean') {
- propTypes.push('boolean');
- } else if (prop.type === 'resolvedImage') {
- propTypes.push('ResolvedImageType');
- } else if (prop.type === 'formatted') {
- propTypes.push('FormattedString');
- } else if (prop.type === 'string') {
- propTypes.push('string');
- } else {
- console.error('Unexpected type:', prop.type);
- throw new Error(`Unexpected type: ${prop.type} for ${prop.name}`);
- }
-
- /*
- if (prop.allowedFunctionTypes && prop.allowedFunctionTypes.length > 0) {
- propTypes.push('StyleFunctionProps');
- }
- */
-
- if (propTypes.length > 1) {
- return `${propTypes.map((p) => startAtSpace(4, p)).join(' | ')},
-${startAtSpace(2, '')}`;
- } else {
- if (prop.expressionSupported) {
- let params = '';
- if (prop.expression && prop.expression.parameters) {
- params = `,[${prop.expression.parameters
- .map((v) => `'${v}'`)
- .join(',')}]`;
- }
- return `Value<${propTypes[0]}${params}>`;
- } else {
- return propTypes[0];
- }
+ switch (prop.type) {
+ case 'number':
+ return 'number';
+ case 'string':
+ return 'string';
+ case 'boolean':
+ return 'boolean';
+ case 'array':
+ return 'any[]';
+ case 'padding':
+ return 'number[]';
+ case 'enum':
+ return prop.doc && prop.doc.values ?
+ Object.keys(prop.doc.values).map(value => `'${value}'`).join(' | ') :
+ 'string';
+ case 'color':
+ return 'string';
+ case 'resolvedImage':
+ return 'string';
+ case 'formatted':
+ return 'string';
+ // ... other cases ...
+ default:
+ throw new Error(`Unexpected type: ${prop.type} for ${prop.name}`);
}
};
diff --git a/scripts/autogenerate.js b/scripts/autogenerate.js
index 3d5ba0296..250872989 100644
--- a/scripts/autogenerate.js
+++ b/scripts/autogenerate.js
@@ -139,7 +139,12 @@ function getPropertiesForLayer(layerName) {
) {
prop.allowedFunctionTypes = ['camera'];
}
-
+ // Overide type padding
+ if(prop.type === 'padding') {
+ prop.type = 'array';
+ prop.value = 'number';
+ prop.length = 4;
+ }
return prop;
});
@@ -325,10 +330,6 @@ async function generate() {
input: path.join(TMPL_PATH, 'RCTMLNStyle.h.ejs'),
output: path.join(IOS_OUTPUT_PATH, 'RCTMLNStyle.h'),
},
- /*{
- input: path.join(TMPL_PATH, 'index.d.ts.ejs'),
- output: path.join(IOS_OUTPUT_PATH, 'index.d.ts'),
- },*/
{
input: path.join(TMPL_PATH, 'MaplibreStyles.ts.ejs'),
output: path.join(JS_OUTPUT_PATH, 'MaplibreStyles.d.ts'),
@@ -356,6 +357,12 @@ async function generate() {
let results = tmpl({layers});
if (filename.endsWith('ts')) {
results = await prettier.format(results, { ...prettierrc, filepath: filename});
+ // Ensure all enums are exported
+ results = results.replace(/enum (\w+Enum) \{[^}]+\}\n/g, 'export $&');
+ // Replace Array with any[]
+ results = results.replace(/Array/g, 'any[]');
+ // Replace padding type with float array
+ results = results.replace(/padding: string;/g, 'padding: number[];');
}
fs.writeFileSync(output, results);
}));
diff --git a/style-spec/v8.json b/style-spec/v8.json
index 041ffe9c1..ea64a9a19 100644
--- a/style-spec/v8.json
+++ b/style-spec/v8.json
@@ -17,7 +17,13 @@
},
"metadata": {
"type": "*",
- "doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."
+ "doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",
+ "example": {
+ "styleeditor:slimmode": true,
+ "styleeditor:comment": "Style generated 1677776383",
+ "styleeditor:version": "3.14.159265",
+ "example:object": { "String": "one", "Number": 2, "Boolean": false }
+ }
},
"center": {
"type": "array",
@@ -57,6 +63,32 @@
"intensity": 0.4
}
},
+ "sky": {
+ "type": "sky",
+ "doc": "The map's sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",
+ "example": {
+ "sky-color": "#199EF3",
+ "sky-horizon-blend": 0.5,
+ "horizon-color": "#ffffff",
+ "horizon-fog-blend": 0.5,
+ "fog-color": "#0000ff",
+ "fog-ground-blend": 0.5,
+ "atmosphere-blend": ["interpolate",
+ ["linear"],
+ ["zoom"],
+ 0,1,
+ 10,1,
+ 12,0
+ ]
+ }
+ },
+ "projection": {
+ "type": "projection",
+ "doc": "The projection configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",
+ "example": {
+ "type": "globe"
+ }
+ },
"terrain": {
"type": "terrain",
"doc": "The terrain configuration.",
@@ -68,22 +100,41 @@
"sources": {
"required": true,
"type": "sources",
- "doc": "Data source specifications.",
+ "doc": "Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\n\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).",
"example": {
"maplibre-demotiles": {
"type": "vector",
"url": "https://demotiles.maplibre.org/tiles/tiles.json"
+ },
+ "maplibre-tilejson": {
+ "type": "vector",
+ "url": "http://api.example.com/tilejson.json"
+ },
+ "maplibre-streets": {
+ "type": "vector",
+ "tiles": [
+ "http://a.example.com/tiles/{z}/{x}/{y}.pbf",
+ "http://b.example.com/tiles/{z}/{x}/{y}.pbf"
+ ],
+ "maxzoom": 14
+ },
+ "wms-imagery": {
+ "type": "raster",
+ "tiles": [
+ "http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example"
+ ],
+ "tileSize": 256
}
}
},
"sprite": {
"type": "sprite",
- "doc": "An array of `{id: 'my-sprite', url: 'https://example.com/sprite'} objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.",
- "example": "https://api.maptiler.com/maps/openstreetmap/sprite"
+ "doc": "An array of `{id: 'my-sprite', url: 'https://example.com/sprite'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.",
+ "example": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite"
},
"glyphs": {
"type": "string",
- "doc": "A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
+ "doc": "A URL template for loading signed-distance-field glyph sets in PBF format. \n\nThe URL must include:\n\n - `{fontstack}` - When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer. \n\n - `{range}` - When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.\n\nThis property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
"example": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf"
},
"transition": {
@@ -98,15 +149,15 @@
"required": true,
"type": "array",
"value": "layer",
- "doc": "Layers will be drawn in the order of this array.",
+ "doc": "A style's `layers` property lists all the layers available in that style. The type of layer is specified by the `type` property, and must be one of `background`, `fill`, `line`, `symbol`, `raster`, `circle`, `fill-extrusion`, `heatmap`, `hillshade`.\n\nExcept for layers of the `background` type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.",
"example": [
{
- "id": "water",
- "source": "mapbox-streets",
- "source-layer": "water",
- "type": "fill",
+ "id": "coastline",
+ "source": "maplibre",
+ "source-layer": "countries",
+ "type": "line",
"paint": {
- "fill-color": "#00ffff"
+ "line-color": "#198EC8"
}
}
]
@@ -156,7 +207,7 @@
180,
85.051129
],
- "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre GL."
+ "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."
},
"scheme": {
"type": "enum",
@@ -196,7 +247,8 @@
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
- "ios": "5.10.0"
+ "ios": "5.10.0",
+ "js": "wontfix"
}
}
},
@@ -235,7 +287,7 @@
180,
85.051129
],
- "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre GL."
+ "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."
},
"minzoom": {
"type": "number",
@@ -277,7 +329,8 @@
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
- "ios": "5.10.0"
+ "ios": "5.10.0",
+ "js": "wontfix"
}
}
},
@@ -316,7 +369,7 @@
180,
85.051129
],
- "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre GL."
+ "doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by MapLibre."
},
"minzoom": {
"type": "number",
@@ -346,11 +399,74 @@
},
"mapbox": {
"doc": "Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."
+ },
+ "custom": {
+ "doc": "Decodes tiles using the redFactor, blueFactor, greenFactor, baseShift parameters."
}
},
"default": "mapbox",
- "doc": "The encoding used by this source. Mapbox Terrain RGB is used by default"
+ "doc": "The encoding used by this source. Mapbox Terrain RGB is used by default.",
+ "sdk-support": {
+ "mapbox, terrarium": {
+ "js": "0.43.0",
+ "ios": "6.0.0",
+ "android": "6.0.0"
+ },
+ "custom": {
+ "js": "3.4.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2783",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2783"
+ }
+ }
+ },
+ "redFactor": {
+ "type": "number",
+ "default": 1.0,
+ "doc": "Value that will be multiplied by the red channel value when decoding. Only used on custom encodings.",
+ "sdk-support": {
+ "basic functionality": {
+ "js": "3.4.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2783",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2783"
+ }
+ }
},
+ "blueFactor": {
+ "type": "number",
+ "default": 1.0,
+ "doc": "Value that will be multiplied by the blue channel value when decoding. Only used on custom encodings.",
+ "sdk-support": {
+ "basic functionality": {
+ "js": "3.4.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2783",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2783"
+ }
+ }
+ },
+ "greenFactor": {
+ "type": "number",
+ "default": 1.0,
+ "doc": "Value that will be multiplied by the green channel value when decoding. Only used on custom encodings.",
+ "sdk-support": {
+ "basic functionality": {
+ "js": "3.4.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2358",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2783"
+ }
+ }
+ },
+ "baseShift": {
+ "type": "number",
+ "default": 0.0,
+ "doc": "Value that will be added to the encoding mix when decoding. Only used on custom encodings.",
+ "sdk-support": {
+ "basic functionality": {
+ "js": "3.4.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2783",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2783"
+ }
+ }
+ },
"volatile": {
"type": "boolean",
"default": false,
@@ -358,7 +474,8 @@
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
- "ios": "5.10.0"
+ "ios": "5.10.0",
+ "js": "wontfix"
}
}
},
@@ -411,7 +528,7 @@
"cluster": {
"type": "boolean",
"default": false,
- "doc": "If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"
+ "doc": "If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n\n * `cluster` Is `true` if the point is a cluster \n\n * `cluster_id` A unique id for the cluster to be used in conjunction with the [cluster inspection methods](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeoJSONSource/#getclusterexpansionzoom)\n\n * `point_count` Number of original points grouped into this cluster\n\n * `point_count_abbreviated` An abbreviated point count"
},
"clusterRadius": {
"type": "number",
@@ -429,7 +546,7 @@
},
"clusterProperties": {
"type": "*",
- "doc": "An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\"property_name\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\"+\"` or `\"max\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{\"sum\": [\"+\", [\"get\", \"scalerank\"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\"accumulated\"]` value, e.g.:\n`{\"sum\": [[\"+\", [\"accumulated\"], [\"get\", \"sum\"]], [\"get\", \"scalerank\"]]}`"
+ "doc": "An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\"property_name\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\"+\"` or `\"max\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{\"sum\": [\"+\", [\"get\", \"scalerank\"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\"accumulated\"]` value, e.g.:\n\n`{\"sum\": [[\"+\", [\"accumulated\"], [\"get\", \"sum\"]], [\"get\", \"scalerank\"]]}`"
},
"lineMetrics": {
"type": "boolean",
@@ -520,8 +637,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
},
@@ -531,8 +647,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
},
@@ -542,8 +657,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
},
@@ -553,8 +667,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
},
@@ -564,8 +677,7 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
@@ -575,8 +687,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
}
},
@@ -586,19 +697,17 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
},
"hillshade": {
- "doc": "Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.",
+ "doc": "Client-side hillshading visualization based on DEM data. The implementation supports Mapbox Terrain RGB, Mapzen Terrarium tiles and custom encodings.",
"sdk-support": {
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
@@ -608,8 +717,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
}
}
@@ -619,7 +727,10 @@
},
"metadata": {
"type": "*",
- "doc": "Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."
+ "doc": "Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.",
+ "example": {
+ "source:comment": "Hydrology FCCODE 460 - Narrow wash"
+ }
},
"source": {
"type": "string",
@@ -682,8 +793,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -697,14 +807,12 @@
"basic functionality": {
"js": "1.2.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
},
"data-driven styling": {
"js": "1.2.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
}
},
"expression": {
@@ -732,8 +840,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -747,14 +854,12 @@
"basic functionality": {
"js": "1.2.0",
"android": "9.2.0",
- "ios": "5.9.0",
- "macos": "0.16.0"
+ "ios": "5.9.0"
},
"data-driven styling": {
"js": "1.2.0",
"android": "9.2.0",
- "ios": "5.9.0",
- "macos": "0.16.0"
+ "ios": "5.9.0"
}
},
"expression": {
@@ -782,8 +887,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -806,8 +910,7 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"property-type": "constant"
@@ -830,8 +933,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"property-type": "constant"
@@ -857,8 +959,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -888,14 +989,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -920,8 +1019,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -945,8 +1043,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -964,14 +1061,12 @@
"basic functionality": {
"js": "1.2.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
},
"data-driven styling": {
"js": "1.2.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
}
},
"expression": {
@@ -999,8 +1094,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -1026,14 +1120,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"`line-center` value": {
"js": "0.47.0",
"android": "6.4.0",
- "ios": "4.3.0",
- "macos": "0.10.0"
+ "ios": "4.3.0"
}
},
"expression": {
@@ -1059,8 +1151,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1079,8 +1170,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1098,14 +1188,12 @@
"basic functionality": {
"js": "0.53.0",
"android": "7.4.0",
- "ios": "4.11.0",
- "macos": "0.14.0"
+ "ios": "4.11.0"
},
"data-driven styling": {
"js": "0.53.0",
"android": "7.4.0",
- "ios": "4.11.0",
- "macos": "0.14.0"
+ "ios": "4.11.0"
}
},
"expression": {
@@ -1136,8 +1224,7 @@
"basic functionality": {
"js": "0.49.0",
"android": "6.6.0",
- "ios": "4.5.0",
- "macos": "0.12.0"
+ "ios": "4.5.0"
}
},
"expression": {
@@ -1162,8 +1249,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1193,7 +1279,9 @@
],
"sdk-support": {
"basic functionality": {
- "js": "2.1.0"
+ "js": "2.1.0",
+ "android": "https://github.com/maplibre/maplibre-native/issues/251",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/251"
}
},
"expression": {
@@ -1215,8 +1303,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1239,8 +1326,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1273,14 +1359,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.3.0"
+ "ios": "3.4.0"
}
},
"expression": {
@@ -1304,14 +1388,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -1349,14 +1431,12 @@
"basic functionality": {
"js": "0.21.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.2.1"
+ "ios": "3.4.0"
},
"stretchable icons": {
"js": "1.6.0",
"android": "9.2.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
}
},
"expression": {
@@ -1394,8 +1474,7 @@
"basic functionality": {
"js": "0.21.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.2.1"
+ "ios": "3.4.0"
}
},
"expression": {
@@ -1414,14 +1493,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -1446,14 +1523,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.21.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -1466,10 +1541,10 @@
"property-type": "data-driven"
},
"icon-padding": {
- "type": "number",
- "default":2,
+ "type": "padding",
+ "default": [2],
"units": "pixels",
- "doc": "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 one-element array - padding applied to all sides.",
+ "doc": "Size of additional area round the icon bounding box used for detecting symbol collisions.",
"requires": [
"icon-image"
],
@@ -1477,11 +1552,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
- "js": "2.2.0"
+ "js": "2.2.0",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2754",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2754"
}
},
"expression": {
@@ -1513,8 +1589,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1541,14 +1616,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -1600,14 +1673,12 @@
"basic functionality": {
"js": "0.40.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -1641,8 +1712,7 @@
"basic functionality": {
"js": "0.39.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -1675,14 +1745,12 @@
"basic functionality": {
"js": "0.21.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.2.1"
+ "ios": "3.4.0"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.3.0"
+ "ios": "3.4.0"
}
},
"expression": {
@@ -1718,17 +1786,17 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.3.0"
+ "ios": "3.4.0"
},
"`viewport-glyph` value": {
- "js": "2.1.8"
+ "js": "2.1.8",
+ "android": "https://github.com/maplibre/maplibre-native/issues/250",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/250"
}
},
"expression": {
@@ -1748,14 +1816,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -1782,14 +1848,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -1814,14 +1878,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -1846,14 +1908,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -1877,8 +1937,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -1901,14 +1960,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -1945,20 +2002,17 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.39.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
},
"auto": {
"js": "0.54.0",
"android": "7.4.0",
- "ios": "4.10.0",
- "macos": "0.14.0"
+ "ios": "4.10.0"
}
},
"expression": {
@@ -1979,14 +2033,12 @@
"basic functionality": {
"js": "0.54.0",
"android": "7.4.0",
- "ios": "4.10.0",
- "macos": "0.14.0"
+ "ios": "4.10.0"
},
"data-driven styling": {
"js": "0.54.0",
"android": "7.4.0",
- "ios": "4.10.0",
- "macos": "0.14.0"
+ "ios": "4.10.0"
}
},
"requires": [
@@ -2046,8 +2098,7 @@
"basic functionality": {
"js": "0.54.0",
"android": "7.4.0",
- "ios": "4.10.0",
- "macos": "0.14.0"
+ "ios": "4.10.0"
}
},
"expression": {
@@ -2058,6 +2109,38 @@
},
"property-type": "data-constant"
},
+ "text-variable-anchor-offset": {
+ "type": "variableAnchorOffsetCollection",
+ "requires": [
+ "text-field",
+ {
+ "symbol-placement": [
+ "point"
+ ]
+ }
+ ],
+ "doc": "To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations, each paired with an offset value. The renderer will attempt to place the label at each location, in order, before moving on to the next location+offset. Use `text-justify: auto` to choose justification based on anchor position. \n\n The length of the array must be even, and must alternate between enum and point entries. i.e., each anchor location must be accompanied by a point, and that point defines the offset when the corresponding anchor location is used. Positive offset values indicate right and down, while negative values indicate left and up. Anchor locations may repeat, allowing the renderer to try multiple offsets to try and place a label using the same anchor. \n\n When present, this property takes precedence over `text-anchor`, `text-variable-anchor`, `text-offset`, and `text-radial-offset`. \n\n ```json \n\n { \"text-variable-anchor-offset\": [\"top\", [0, 4], \"left\", [3,0], \"bottom\", [1, 1]] } \n\n ``` \n\n When the renderer chooses the `top` anchor, `[0, 4]` will be used for `text-offset`; the text will be shifted down by 4 ems. \n\n When the renderer chooses the `left` anchor, `[3, 0]` will be used for `text-offset`; the text will be shifted right by 3 ems.",
+ "sdk-support": {
+ "basic functionality": {
+ "js": "3.3.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2358",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2358"
+ },
+ "data-driven styling": {
+ "js": "3.3.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2358",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2358"
+ }
+ },
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom",
+ "feature"
+ ]
+ },
+ "property-type": "data-driven"
+ },
"text-anchor": {
"type": "enum",
"values": {
@@ -2101,14 +2184,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.39.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -2138,8 +2219,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2174,8 +2254,7 @@
"basic functionality": {
"js": "1.3.0",
"android": "8.3.0",
- "ios": "5.3.0",
- "macos": "0.15.0"
+ "ios": "5.3.0"
}
},
"expression": {
@@ -2199,14 +2278,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -2231,8 +2308,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2263,8 +2339,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2297,14 +2372,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -2336,14 +2409,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -2369,8 +2440,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2400,7 +2470,9 @@
],
"sdk-support": {
"basic functionality": {
- "js": "2.1.0"
+ "js": "2.1.0",
+ "android": "https://github.com/maplibre/maplibre-native/issues/251",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/251"
}
},
"expression": {
@@ -2422,8 +2494,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2446,8 +2517,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -2474,8 +2544,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -2498,8 +2567,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"property-type": "constant"
@@ -2522,8 +2590,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"property-type": "constant"
@@ -2575,9 +2642,6 @@
},
"!has": {
"doc": "`[\"!has\", key]` `feature[key]` does not exist"
- },
- "within": {
- "doc": "`[\"within\", object]` feature geometry is within object geometry"
}
},
"doc": "The filter operator."
@@ -2656,7 +2720,7 @@
"default": {
"type": "*",
"required": false,
- "doc": "A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."
+ "doc": "A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n\n* In categorical functions, when the feature value does not match any of the stop domain values.\n\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\n\nIf no default is provided, the style property's default is used in these circumstances."
}
},
"function_stop": {
@@ -2681,1034 +2745,1549 @@
"type": "enum",
"values": {
"let": {
- "doc": "Binds expressions to named variables, which can then be referenced in the result expression using [\"var\", \"variable_name\"].",
+ "doc": "Binds expressions to named variables, which can then be referenced in the result expression using `[\"var\", \"variable_name\"]`.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
+ "example": {
+ "syntax": {
+ "method": ["string", "value", "expression"],
+ "result": "value"
+ },
+ "value": ["let", "someNumber", 500, ["interpolate", ["linear"], ["var", "someNumber"], 274, "#edf8e9", 1551, "#006d2c"]]
+ },
"group": "Variable binding",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"var": {
- "doc": "References variable bound using \"let\".",
+ "doc": "References variable bound using `let`.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "value"
+ },
+ "value": ["var", "density"]
+ },
"group": "Variable binding",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"literal": {
- "doc": "Provides a literal array or object value.",
+ "doc": "Provides a literal array or object value.\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)",
+ "example": {
+ "syntax": {
+ "method": ["JSON object or array"],
+ "result": "array | object"
+ },
+ "value": ["literal",["DIN Offc Pro Italic", "Arial Unicode MS Regular"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"array": {
- "doc": "Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",
+ "doc": "Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",
+ "example": {
+ "syntax": {
+ "method": ["value", "string?", "number?"],
+ "result": "array"
+ },
+ "value": ["array", ["literal", ["a", "b", "c"]], "string", 3]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"at": {
"doc": "Retrieves an item from an array.",
+ "example": {
+ "syntax": {
+ "method": ["number", "value"],
+ "result": "value"
+ },
+ "value": ["at", 1, ["literal", ["a", "b", "c"]]]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"in": {
- "doc": "Determines whether an item exists in an array or a substring exists in a string.",
+ "doc": "Determines whether an item exists in an array or a substring exists in a string.\n\n - [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value"],
+ "result": "boolean"
+ },
+ "value": ["in", "$type", "Point"]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
"js": "1.6.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
}
}
},
"index-of": {
- "doc": "Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",
+ "doc": "Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search. In a string, a UTF-16 surrogate pair counts as a single position.",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "number?"],
+ "result": "number"
+ },
+ "value": ["index-of", "foo", ["baz", "bar", "hello", "foo", "world"]]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
- "js": "1.10.0"
+ "js": "1.10.0",
+ "android": "10.3.0",
+ "ios": "6.0.0"
}
}
},
"slice": {
- "doc": "Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",
+ "doc": "Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index. In a string, a UTF-16 surrogate pair counts as a single position.",
+ "example": {
+ "syntax": {
+ "method": ["value", "number", "number?"],
+ "result": "value"
+ },
+ "value": ["slice", ["get", "name"], 0, 3]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
- "js": "1.10.0"
+ "js": "1.10.0",
+ "android": "10.3.0",
+ "ios": "6.0.0"
}
}
},
"case": {
- "doc": "Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",
+ "doc": "Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "...", "fallback: value"],
+ "result": "value"
+ },
+ "value": ["case", ["boolean", ["feature-state", "hover"], false], 1, 0.5 ]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"match": {
- "doc": "Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\"get\", \"building_type\"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\"c\", \"b\"]`). The input matches if any of the values in the array matches, similar to the `\"in\"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.",
+ "doc": "Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\"get\", \"building_type\"]`). Each label must be either:\n\n - a single literal value; or\n\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\"c\", \"b\"]`). The input matches if any of the values in the array matches, similar to the `\"in\"` operator.\n\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "...", "fallback: value"],
+ "result": "value"
+ },
+ "value": ["match", ["get", "building_type"], "residential", "#f00", "commercial", "#0f0", "#000"]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"coalesce": {
- "doc": "Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",
+ "doc": "Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)",
+ "example": {
+ "syntax": {
+ "method": ["coalesce", "value", "fallback"],
+ "result": "value"
+ },
+ "value": ["coalesce", ["image", ["concat", ["get", "icon"], "_15"]], ["image", "marker_15"] ]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"step": {
- "doc": "Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.",
+ "doc": "Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)",
+ "example": {
+ "syntax": {
+ "method": ["step", "number", "number", "number", "..."],
+ "result": "number"
+ },
+ "value": [ "step", ["get", "point_count"], 20, 100, 30, 750, 40]
+ },
"group": "Ramps, scales, curves",
"sdk-support": {
"basic functionality": {
"js": "0.42.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"interpolate": {
- "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `[\"linear\"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `[\"exponential\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.",
+ "doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n\n- `[\"linear\"]`, or an expression returning one of those types: Interpolates linearly between the pair of stops just less than and just greater than the input.\n\n- `[\"exponential\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n\n- `[\"cubic-bezier\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\n\n - [Animate map camera around a point](https://maplibre.org/maplibre-gl-js/docs/examples/animate-camera-around-point/)\n\n - [Change building color based on zoom level](https://maplibre.org/maplibre-gl-js/docs/examples/change-building-color-based-on-zoom-level/)\n\n - [Create a heatmap layer](https://maplibre.org/maplibre-gl-js/docs/examples/heatmap-layer/)\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
+ "example": {
+ "syntax": {
+ "method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
+ "result": "number | array | color"
+ },
+ "value": ["interpolate", ["linear"], ["zoom"], 15, 0, 15.05, ["get", "height"]]
+ },
"group": "Ramps, scales, curves",
"sdk-support": {
"basic functionality": {
"js": "0.42.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"interpolate-hcl": {
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.",
+ "example": {
+ "syntax": {
+ "method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
+ "result": "color"
+ },
+ "value": ["interpolate-hcl", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"]
+ },
"group": "Ramps, scales, curves",
"sdk-support": {
"basic functionality": {
- "js": "0.49.0"
+ "js": "0.49.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2784",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2784"
}
}
},
"interpolate-lab": {
"doc": "Produces continuous, smooth results by interpolating between pairs of input and output values (\"stops\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.",
+ "example": {
+ "syntax": {
+ "method": ["[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]", "number", "number", "number", "..."],
+ "result": "color"
+ },
+ "value": ["interpolate-lab", ["linear"], ["zoom"], 15, "#f00", 15.05, "#00f"]
+ },
"group": "Ramps, scales, curves",
"sdk-support": {
"basic functionality": {
- "js": "0.49.0"
+ "js": "0.49.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/2784",
+ "android": "https://github.com/maplibre/maplibre-native/issues/2784"
}
}
},
"ln2": {
"doc": "Returns mathematical constant ln(2).",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "number"
+ },
+ "value": ["ln2"]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"pi": {
"doc": "Returns the mathematical constant pi.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "number"
+ },
+ "value": ["pi"]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"e": {
"doc": "Returns the mathematical constant e.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "number"
+ },
+ "value": ["e"]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"typeof": {
"doc": "Returns a string describing the type of the given value.",
+ "example": {
+ "syntax": {
+ "method": ["value"],
+ "result": "string"
+ },
+ "value": ["typeof", ["get", "name"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"string": {
"doc": "Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "string"
+ },
+ "value": ["string", ["get", "name"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"number": {
"doc": "Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "number"
+ },
+ "value": ["number", ["get", "population"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"boolean": {
- "doc": "Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",
+ "doc": "Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "boolean"
+ },
+ "value": ["boolean", ["feature-state", "hover"], false]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"object": {
"doc": "Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "object"
+ },
+ "value": ["object", ["get", "some-property"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"collator": {
"doc": "Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",
+ "example": {
+ "syntax": {
+ "method": ["collator", "{ \"case-sensitive\": boolean, \"diacritic-sensitive\": boolean, \"locale\": string }"],
+ "result": "collator"
+ },
+ "value": ["collator", {"case-sensitive": true, "diacritic-sensitive": true, "locale": "fr"}]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
"format": {
- "doc": "Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `\"text-font\"`: Overrides the font stack specified by the root layout property.\n- `\"text-color\"`: Overrides the color specified by the root paint property.\n- `\"font-scale\"`: Applies a scaling factor on `text-size` as specified by the root layout property.",
+ "doc": "Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#image) expression. Strings may be followed by a style override object that supports the following properties:\n\n- `\"text-font\"`: Overrides the font stack specified by the root layout property.\n\n- `\"text-color\"`: Overrides the color specified by the root paint property.\n\n- `\"font-scale\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display and style rich text labels](https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "{ \"text-font\": string, \"text-color\": color, \"font-scale\": number }", "..."],
+ "result": "formatted"
+ },
+ "value": ["format", ["upcase", ["get", "FacilityName"]], {"font-scale": 0.8}, "\n\n", {}, ["downcase", ["get", "Comments"]], {"font-scale": 0.6}]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.48.0",
"android": "6.7.0",
- "ios": "4.6.0",
- "macos": "0.12.0"
+ "ios": "4.6.0"
},
"text-font": {
"js": "0.48.0",
"android": "6.7.0",
- "ios": "4.6.0",
- "macos": "0.12.0"
+ "ios": "4.6.0"
},
"font-scale": {
"js": "0.48.0",
"android": "6.7.0",
- "ios": "4.6.0",
- "macos": "0.12.0"
+ "ios": "4.6.0"
},
"text-color": {
"js": "1.3.0",
"android": "7.3.0",
- "ios": "4.10.0",
- "macos": "0.14.0"
+ "ios": "4.10.0"
},
"image": {
"js": "1.6.0",
"android": "8.6.0",
- "ios": "5.7.0",
- "macos": "0.15.0"
+ "ios": "5.7.0"
}
}
},
"image": {
- "doc": "Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",
+ "doc": "Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)",
+ "example": {
+ "syntax": {
+ "method": ["value"],
+ "result": "image"
+ },
+ "value": ["image", "marker_15"]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "1.4.0",
"android": "8.6.0",
- "ios": "5.7.0",
- "macos": "0.15.0"
+ "ios": "5.7.0"
}
}
},
"number-format": {
- "doc": "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",
+ "doc": "Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["number", "{ \"locale\": string, \"currency\": string, \"min-fraction-digits\": number, \"max-fraction-digits\": number }"],
+ "result": "string"
+ },
+ "value": ["number-format", ["get", "mag"], {"min-fraction-digits": 1, "max-fraction-digits": 1}]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
- "js": "0.54.0"
+ "js": "0.54.0",
+ "android": "8.4.0",
+ "ios": "supported"
}
}
},
"to-string": {
- "doc": "Converts the input value to a string. If the input is `null`, the result is `\"\"`. If the input is a boolean, the result is `\"true\"` or `\"false\"`. If the input is a number, it is converted to a string as specified by the [\"NumberToString\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\"rgba(r,g,b,a)\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.",
+ "doc": "Converts the input value to a string. If the input is `null`, the result is `\"\"`. If the input is a boolean, the result is `\"true\"` or `\"false\"`. If the input is a number, it is converted to a string as specified by the [\"NumberToString\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\"rgba(r,g,b,a)\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)",
+ "example": {
+ "syntax": {
+ "method": ["value"],
+ "result": "string"
+ },
+ "value": ["to-string", ["get", "mag"]]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"to-number": {
"doc": "Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\"ToNumber Applied to the String Type\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "number"
+ },
+ "value": ["to-number", "someProperty"]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"to-boolean": {
"doc": "Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",
+ "example": {
+ "syntax": {
+ "method": ["value"],
+ "result": "boolean"
+ },
+ "value": ["to-boolean", "someProperty"]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"to-rgba": {
"doc": "Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",
+ "example": {
+ "syntax": {
+ "method": ["color"],
+ "result": "array"
+ },
+ "value": ["to-rgba", "#ff0000"]
+ },
"group": "Color",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"to-color": {
- "doc": "Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",
+ "doc": "Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "fallback: value", "fallback: value", "..."],
+ "result": "color"
+ },
+ "value": ["to-color", "#edf8e9"]
+ },
"group": "Types",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"rgb": {
"doc": "Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "number"],
+ "result": "color"
+ },
+ "value": ["rgb", 255, 0, 0]
+ },
"group": "Color",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"rgba": {
"doc": "Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "number", "number"],
+ "result": "color"
+ },
+ "value": ["rgba", 255, 0, 0, 1]
+ },
"group": "Color",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"get": {
- "doc": "Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",
+ "doc": "Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)\n\n - [Extrude polygons for 3D indoor mapping](https://maplibre.org/maplibre-gl-js/docs/examples/3d-extrusion-floorplan/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "value"
+ },
+ "value": ["get", "someProperty"]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"has": {
- "doc": "Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",
+ "doc": "Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "boolean"
+ },
+ "value": ["has", "someProperty"]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"length": {
- "doc": "Gets the length of an array or string.",
+ "doc": "Gets the length of an array or string. In a string, a UTF-16 surrogate pair counts as a single position.",
+ "example": {
+ "syntax": {
+ "method": ["array"],
+ "result": "number"
+ },
+ "value": ["length", ["get", "myArray"]]
+ },
"group": "Lookup",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"properties": {
"doc": "Gets the feature properties object. Note that in some cases, it may be more efficient to use [\"get\", \"property_name\"] directly.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "value"
+ },
+ "value": ["properties"]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"feature-state": {
- "doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",
+ "doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. When `source.promoteId` is not provided, features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. When `source.promoteId` is provided, features are identified by their `promoteId` property, which may be a number, string, or any primitive data type. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.\n\n - [Create a hover effect](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "value"
+ },
+ "value": ["feature-state", "hover"]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
- "js": "0.46.0"
+ "js": "0.46.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/1698",
+ "android": "https://github.com/maplibre/maplibre-native/issues/1698"
}
}
},
"geometry-type": {
"doc": "Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "string"
+ },
+ "value": ["==", ["geometry-type"], "Polygon"]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"id": {
"doc": "Gets the feature's id, if it has one.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "value"
+ },
+ "value": ["id"]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"zoom": {
"doc": "Gets the current zoom level. Note that in style layout and paint properties, [\"zoom\"] may only appear as the input to a top-level \"step\" or \"interpolate\" expression.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "number"
+ },
+ "value": ["interpolate",["linear"],["zoom"],15,0,15.05,["get","height"]]
+ },
"group": "Zoom",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"heatmap-density": {
"doc": "Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",
+ "example": {
+ "syntax": {
+ "method": [],
+ "result": "number"
+ },
+ "value": ["heatmap-density"]
+ },
"group": "Heatmap",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"line-progress": {
"doc": "Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["line-progress", 0.5]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.6.0",
- "macos": "0.12.0"
+ "ios": "4.6.0"
}
}
},
"accumulated": {
"doc": "Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "value"
+ },
+ "value": ["accumulated", "sum"]
+ },
"group": "Feature data",
"sdk-support": {
"basic functionality": {
- "js": "0.53.0"
+ "js": "0.53.0",
+ "ios": "supported",
+ "android": "supported"
}
}
},
"+": {
"doc": "Returns the sum of the inputs.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "..."],
+ "result": "number"
+ },
+ "value": ["+", 2, 3]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"*": {
"doc": "Returns the product of the inputs.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "..."],
+ "result": "number"
+ },
+ "value": ["*", 2, 3]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"-": {
"doc": "For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number?"],
+ "result": "number"
+ },
+ "value": ["-", 10]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"/": {
- "doc": "Returns the result of floating point division of the first input by the second.",
+ "doc": "Returns the result of floating point division of the first input by the second.\n\n - [Visualize population density](https://maplibre.org/maplibre-gl-js/docs/examples/visualize-population-density/)",
+ "example": {
+ "syntax": {
+ "method": ["number", "number"],
+ "result": "number"
+ },
+ "value": ["/", ["get", "population"], ["get", "sq-km"]]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"%": {
"doc": "Returns the remainder after integer division of the first input by the second.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number"],
+ "result": "number"
+ },
+ "value": ["%", 10, 3]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"^": {
"doc": "Returns the result of raising the first input to the power specified by the second.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number"],
+ "result": "number"
+ },
+ "value": ["^", 2, 3]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"sqrt": {
"doc": "Returns the square root of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["sqrt", 9]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.42.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"log10": {
"doc": "Returns the base-ten logarithm of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["log10", 8]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"ln": {
"doc": "Returns the natural logarithm of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["ln", 8]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"log2": {
"doc": "Returns the base-two logarithm of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["log2", 8]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"sin": {
"doc": "Returns the sine of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["sin", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"cos": {
"doc": "Returns the cosine of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["cos", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"tan": {
"doc": "Returns the tangent of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["tan", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"asin": {
"doc": "Returns the arcsine of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["asin", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"acos": {
"doc": "Returns the arccosine of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["acos", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"atan": {
"doc": "Returns the arctangent of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["atan", 1]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"min": {
"doc": "Returns the minimum value of the inputs.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "..."],
+ "result": "number"
+ },
+ "value": ["min", 1, 2]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"max": {
"doc": "Returns the maximum value of the inputs.",
+ "example": {
+ "syntax": {
+ "method": ["number", "number", "..."],
+ "result": "number"
+ },
+ "value": ["max", 1, 2]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"round": {
"doc": "Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\"round\", -1.5]` evaluates to -2.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["round", 1.5]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"abs": {
"doc": "Returns the absolute value of the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["abs", -1.5]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"ceil": {
"doc": "Returns the smallest integer that is greater than or equal to the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["ceil", 1.5]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"floor": {
"doc": "Returns the largest integer that is less than or equal to the input.",
+ "example": {
+ "syntax": {
+ "method": ["number"],
+ "result": "number"
+ },
+ "value": ["floor", 1.5]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"distance": {
"doc": "Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",
+ "example": {
+ "syntax": {
+ "method": ["GeoJSON geometry"],
+ "result": "number"
+ },
+ "value": ["distance", { "type": "Point", "coordinates": [0, 0]}]
+ },
"group": "Math",
"sdk-support": {
"basic functionality": {
+ "js": "4.2.0",
"android": "9.2.0",
- "ios": "5.9.0",
- "macos": "0.16.0"
+ "ios": "5.9.0"
}
}
},
"==": {
- "doc": "Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "doc": "Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Add multiple geometries from one GeoJSON source](https://maplibre.org/maplibre-gl-js/docs/examples/multiple-geometries/)\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\n\n - [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/3d-buildings/)\n\n - [Filter symbols by toggling a list](https://maplibre.org/maplibre-gl-js/docs/examples/filter-markers/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": ["==", "$type", "Polygon"]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
"!=": {
- "doc": "Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "doc": "Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": ["!=", "cluster", true]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
">": {
"doc": "Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": [">", ["get", "mag"], 2]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
"<": {
- "doc": "Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "doc": "Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": ["<", ["get", "mag"], 2]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
">=": {
- "doc": "Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "doc": "Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": [">=", ["get", "mag"], 6]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
"<=": {
"doc": "Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": ["<=", ["get", "mag"], 6]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"collator": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
},
"all": {
- "doc": "Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",
+ "doc": "Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\n\n - [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)",
+ "example": {
+ "syntax": {
+ "method": ["boolean", "boolean", "..."],
+ "result": "boolean"
+ },
+ "value": ["all", [">=", ["get", "mag"], 4], ["<", ["get", "mag"], 5]]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"any": {
"doc": "Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",
+ "example": {
+ "syntax": {
+ "method": ["boolean", "boolean", "..."],
+ "result": "boolean"
+ },
+ "value": ["any", [">=", ["get", "mag"], 4], ["<", ["get", "mag"], 5]]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"!": {
- "doc": "Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",
+ "doc": "Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\n\n - [Create and style clusters](https://maplibre.org/maplibre-gl-js/docs/examples/cluster/)",
+ "example": {
+ "syntax": {
+ "method": ["value", "value", "collator?"],
+ "result": "boolean"
+ },
+ "value": ["!", ["has", "point_count"]]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"within": {
- "doc": "Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",
+ "doc": "Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",
+ "example": {
+ "syntax": {
+ "method": ["GeoJSON geometry"],
+ "result": "boolean"
+ },
+ "value": ["within", {"type": "Polygon","coordinates": [[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]]}]
+ },
"group": "Decision",
"sdk-support": {
"basic functionality": {
"js": "1.9.0",
"android": "9.1.0",
- "ios": "5.8.0",
- "macos": "0.15.0"
+ "ios": "5.8.0"
}
}
},
"is-supported-script": {
"doc": "Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in MapLibre GL JS).",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "boolean"
+ },
+ "value": ["is-supported-script", "दिल्ली"]
+ },
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
- "android": "6.6.0"
+ "android": "6.6.0",
+ "ios": "supported"
}
}
},
"upcase": {
- "doc": "Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",
+ "doc": "Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "string"
+ },
+ "value": ["upcase", ["get", "name"]]
+ },
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"downcase": {
- "doc": "Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",
+ "doc": "Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\n\n - [Change the case of labels](https://maplibre.org/maplibre-gl-js/docs/examples/change-case-of-labels/)",
+ "example": {
+ "syntax": {
+ "method": ["string"],
+ "result": "string"
+ },
+ "value": ["downcase", ["get", "name"]]
+ },
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"concat": {
- "doc": "Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",
+ "doc": "Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\n\n - [Add a generated icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-image-missing-generated/)\n\n - [Create a time slider](https://maplibre.org/maplibre-gl-js/docs/examples/timeline-animation/)\n\n - [Use a fallback image](https://maplibre.org/maplibre-gl-js/docs/examples/fallback-image/)\n\n - [Variable label placement](https://maplibre.org/maplibre-gl-js/docs/examples/variable-label-placement/)",
+ "example": {
+ "syntax": {
+ "method": ["string", "string", "..."],
+ "result": "string"
+ },
+ "value": ["concat", "square-rgb-", ["get", "color"]]
+ },
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
}
},
"resolved-locale": {
"doc": "Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",
+ "example": {
+ "syntax": {
+ "method": ["collator"],
+ "result": "string"
+ },
+ "value": ["resolved-locale", [
+ "collator",
+ {"case-sensitive": true, "diacritic-sensitive": false, "locale": "de"}
+ ]]
+ },
"group": "String",
"sdk-support": {
"basic functionality": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
}
}
@@ -3740,8 +4319,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
}
},
@@ -3772,8 +4350,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
}
},
@@ -3793,8 +4370,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
}
},
@@ -3816,12 +4392,112 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
}
}
},
+ "sky": {
+ "sky-color": {
+ "type": "color",
+ "property-type": "data-constant",
+ "default": "#88C6FC",
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "The base color for the sky."
+ },
+ "horizon-color": {
+ "type": "color",
+ "property-type": "data-constant",
+ "default": "#ffffff",
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "The base color at the horizon."
+ },
+ "fog-color": {
+ "type": "color",
+ "property-type": "data-constant",
+ "default": "#ffffff",
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "The base color for the fog. Requires 3D terrain."
+ },
+ "fog-ground-blend": {
+ "type": "number",
+ "property-type": "data-constant",
+ "default": 0.5,
+ "minimum": 0,
+ "maximum": 1,
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "How to blend the fog over the 3D terrain. Where 0 is the map center and 1 is the horizon."
+ },
+ "horizon-fog-blend": {
+ "type": "number",
+ "property-type": "data-constant",
+ "default": 0.8,
+ "minimum": 0,
+ "maximum": 1,
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "How to blend the fog color and the horizon color. Where 0 is using the horizon color only and 1 is using the fog color only."
+ },
+ "sky-horizon-blend": {
+ "type": "number",
+ "property-type": "data-constant",
+ "default": 0.8,
+ "minimum": 0,
+ "maximum": 1,
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "How to blend the the sky color and the horizon color. Where 1 is blending the color at the middle of the sky and 0 is not blending at all and using the sky color only."
+ },
+ "atmosphere-blend": {
+ "type": "number",
+ "property-type": "data-constant",
+ "default": 0.8,
+ "minimum": 0,
+ "maximum": 1,
+ "expression": {
+ "interpolated": true,
+ "parameters": [
+ "zoom"
+ ]
+ },
+ "transition": true,
+ "doc": "How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection."
+ }
+ },
"terrain": {
"source": {
"type": "string",
@@ -3829,7 +4505,9 @@
"required": true,
"sdk-support": {
"basic functionality": {
- "js": "2.2.0"
+ "js": "2.2.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/252",
+ "android": "https://github.com/maplibre/maplibre-native/issues/252"
}
}
},
@@ -3840,7 +4518,24 @@
"default": 1.0,
"sdk-support": {
"basic functionality": {
- "js": "2.2.0"
+ "js": "2.2.0",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/252",
+ "android": "https://github.com/maplibre/maplibre-native/issues/252"
+ }
+ }
+ }
+ },
+ "projection": {
+ "type": {
+ "type": "enum",
+ "doc": "The projection type.",
+ "default": "mercator",
+ "values": {
+ "mercator": {
+ "doc": "The Mercator projection."
+ },
+ "globe": {
+ "doc": "The globe projection."
}
}
}
@@ -3865,8 +4560,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -3888,14 +4582,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.21.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -3922,14 +4614,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.19.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -3958,14 +4648,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.19.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -3993,8 +4681,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4024,8 +4711,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4044,13 +4730,11 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.49.0",
"android": "6.5.0",
- "macos": "0.11.0",
"ios": "4.4.0"
}
},
@@ -4076,8 +4760,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4102,14 +4785,12 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
},
"data-driven styling": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4137,8 +4818,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4168,8 +4848,7 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4188,13 +4867,11 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
},
"data-driven styling": {
"js": "0.49.0",
"android": "6.5.0",
- "macos": "0.11.0",
"ios": "4.4.0"
}
},
@@ -4218,14 +4895,12 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
},
"data-driven styling": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4252,14 +4927,12 @@
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
},
"data-driven styling": {
"js": "0.27.0",
"android": "5.1.0",
- "ios": "3.6.0",
- "macos": "0.5.0"
+ "ios": "3.6.0"
}
},
"expression": {
@@ -4281,7 +4954,7 @@
"basic functionality": {
"js": "0.50.0",
"ios": "4.7.0",
- "macos": "0.13.0"
+ "android": "7.0.0"
}
},
"expression": {
@@ -4305,14 +4978,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4339,14 +5010,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.23.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4374,8 +5043,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4405,8 +5073,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4428,14 +5095,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.39.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -4459,14 +5124,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4489,14 +5152,12 @@
"basic functionality": {
"js": "0.12.1",
"android": "3.0.0",
- "ios": "3.1.0",
- "macos": "0.1.0"
+ "ios": "3.1.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4520,14 +5181,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4556,10 +5215,13 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
- "data-driven styling": {}
+ "data-driven styling": {
+ "js": "https://github.com/maplibre/maplibre-gl-js/issues/1235",
+ "ios": "https://github.com/maplibre/maplibre-native/issues/744",
+ "android": "https://github.com/maplibre/maplibre-native/issues/744"
+ }
},
"expression": {
"interpolated": false,
@@ -4577,13 +5239,11 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.49.0",
"android": "6.5.0",
- "macos": "0.11.0",
"ios": "4.4.0"
}
},
@@ -4618,8 +5278,7 @@
"basic functionality": {
"js": "0.45.0",
"android": "6.5.0",
- "ios": "4.4.0",
- "macos": "0.11.0"
+ "ios": "4.4.0"
},
"data-driven styling": {}
},
@@ -4644,14 +5303,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.18.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4673,14 +5330,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.18.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4702,14 +5357,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.20.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4733,14 +5386,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.20.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4768,8 +5419,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4799,8 +5449,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -4827,8 +5476,7 @@
"basic functionality": {
"js": "0.21.0",
"android": "4.2.0",
- "ios": "3.4.0",
- "macos": "0.2.1"
+ "ios": "3.4.0"
}
},
"expression": {
@@ -4855,8 +5503,7 @@
"basic functionality": {
"js": "0.39.0",
"android": "5.2.0",
- "ios": "3.7.0",
- "macos": "0.6.0"
+ "ios": "3.7.0"
}
},
"expression": {
@@ -4878,14 +5525,12 @@
"basic functionality": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4907,14 +5552,12 @@
"basic functionality": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4938,14 +5581,12 @@
"basic functionality": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -4971,14 +5612,12 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"data-driven styling": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5001,14 +5640,12 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"data-driven styling": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5031,8 +5668,7 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5072,8 +5708,7 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
},
"data-driven styling": {}
},
@@ -5096,8 +5731,7 @@
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5124,14 +5758,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5148,7 +5780,7 @@
"type": "color",
"default": "#000000",
"transition": true,
- "doc": "The color of the icon. This can only be used with sdf icons.",
+ "doc": "The color of the icon. This can only be used with SDF icons.",
"requires": [
"icon-image"
],
@@ -5156,14 +5788,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5188,14 +5818,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5214,7 +5842,7 @@
"minimum": 0,
"transition": true,
"units": "pixels",
- "doc": "Distance of halo to the icon outline.",
+ "doc": "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.",
"requires": [
"icon-image"
],
@@ -5222,14 +5850,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5256,14 +5882,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5294,8 +5918,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5326,8 +5949,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5352,14 +5974,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5385,14 +6005,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5417,14 +6035,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5451,14 +6067,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5485,14 +6099,12 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
- "ios": "3.5.0",
- "macos": "0.4.0"
+ "ios": "3.5.0"
}
},
"expression": {
@@ -5523,8 +6135,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5555,8 +6166,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5580,8 +6190,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5603,8 +6212,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5626,8 +6234,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5649,8 +6256,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5672,8 +6278,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5695,8 +6300,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5723,8 +6327,7 @@
"basic functionality": {
"js": "0.47.0",
"android": "6.3.0",
- "ios": "4.2.0",
- "macos": "0.9.0"
+ "ios": "4.2.0"
}
},
"expression": {
@@ -5741,13 +6344,12 @@
"minimum": 0,
"transition": false,
"units": "milliseconds",
- "doc": "Fade duration when a new tile is added.",
+ "doc": "Fade duration when a new tile is added, or when a video is started or its coordinates are updated.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5771,8 +6373,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5799,8 +6400,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5822,8 +6422,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5843,8 +6442,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5864,8 +6462,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5885,8 +6482,7 @@
"basic functionality": {
"js": "0.43.0",
"android": "6.0.0",
- "ios": "4.0.0",
- "macos": "0.7.0"
+ "ios": "4.0.0"
}
},
"expression": {
@@ -5913,8 +6509,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -5933,8 +6528,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
},
"data-driven styling": {}
},
@@ -5957,8 +6551,7 @@
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
- "ios": "2.0.0",
- "macos": "0.1.0"
+ "ios": "2.0.0"
}
},
"expression": {
@@ -6018,4 +6611,4 @@
"doc": "A name of a feature property to use as ID for feature state."
}
}
-}
\ No newline at end of file
+}