From b66b82001240b314a7d75a29dab09dfde05f09b4 Mon Sep 17 00:00:00 2001 From: tobrun Date: Thu, 9 May 2019 17:26:52 +0200 Subject: [PATCH 1/4] [annotations] - update style spec, remove zIndex in favor of style spec property, integrate variable anchor --- .../plugins/annotation/SymbolManagerTest.java | 13 ++ .../plugins/annotation/SymbolTest.java | 30 ++- plugin-annotation/scripts/code-gen.js | 3 + plugin-annotation/scripts/v8.json | 174 +++++++++++++++++- .../mapboxsdk/plugins/annotation/Symbol.java | 60 ++++++ .../plugins/annotation/SymbolManager.java | 39 ++++ .../plugins/annotation/SymbolOptions.java | 60 ++++++ .../plugins/annotation/SymbolManagerTest.java | 36 +++- 8 files changed, 402 insertions(+), 13 deletions(-) diff --git a/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java b/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java index b5e702dbe..5d33fa5f2 100644 --- a/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java +++ b/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java @@ -233,6 +233,19 @@ public void testTextLineHeightAsConstant() { }); } + @Test + public void testTextVariableAnchorAsConstant() { + validateTestSetup(); + setupSymbolManager(); + Timber.i("text-variable-anchor"); + invoke(mapboxMap, (uiController, mapboxMap) -> { + assertNotNull(symbolManager); + + symbolManager.setTextVariableAnchor(new String[]{TEXT_ANCHOR_RIGHT, TEXT_ANCHOR_TOP}); + assertEquals((String[]) symbolManager.getTextVariableAnchor(), (String[]) new String[]{TEXT_ANCHOR_RIGHT, TEXT_ANCHOR_TOP}); + }); + } + @Test public void testTextMaxAngleAsConstant() { validateTestSetup(); diff --git a/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolTest.java b/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolTest.java index 115a42c71..9ff42415b 100644 --- a/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolTest.java +++ b/app/src/androidTest/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolTest.java @@ -44,6 +44,19 @@ private void setupAnnotation() { }); } + @Test + public void testSymbolSortKey() { + validateTestSetup(); + setupAnnotation(); + Timber.i("symbol-sort-key"); + invoke(mapboxMap, (uiController, mapboxMap) -> { + assertNotNull(symbol); + + symbol.setSymbolSortKey(0.3f); + assertEquals((Float) symbol.getSymbolSortKey(), (Float) 0.3f); + }); + } + @Test public void testIconSize() { validateTestSetup(); @@ -182,8 +195,21 @@ public void testTextJustify() { invoke(mapboxMap, (uiController, mapboxMap) -> { assertNotNull(symbol); - symbol.setTextJustify(TEXT_JUSTIFY_LEFT); - assertEquals((String) symbol.getTextJustify(), (String) TEXT_JUSTIFY_LEFT); + symbol.setTextJustify(TEXT_JUSTIFY_AUTO); + assertEquals((String) symbol.getTextJustify(), (String) TEXT_JUSTIFY_AUTO); + }); + } + + @Test + public void testTextRadialOffset() { + validateTestSetup(); + setupAnnotation(); + Timber.i("text-radial-offset"); + invoke(mapboxMap, (uiController, mapboxMap) -> { + assertNotNull(symbol); + + symbol.setTextRadialOffset(0.3f); + assertEquals((Float) symbol.getTextRadialOffset(), (Float) 0.3f); }); } diff --git a/plugin-annotation/scripts/code-gen.js b/plugin-annotation/scripts/code-gen.js index 4fa3ae30f..b32c678f9 100644 --- a/plugin-annotation/scripts/code-gen.js +++ b/plugin-annotation/scripts/code-gen.js @@ -227,6 +227,9 @@ global.defaultValueJava = function(property) { } if(property.name.endsWith("-font")) { return 'new String[]{"Open Sans Regular", "Arial Unicode MS Regular"}'; + } + if(property.name.endsWith("text-variable-anchor")){ + return 'new String[]{TEXT_ANCHOR_RIGHT, TEXT_ANCHOR_TOP}' } switch (property.type) { case 'boolean': diff --git a/plugin-annotation/scripts/v8.json b/plugin-annotation/scripts/v8.json index 8ca049c85..2fca311c3 100644 --- a/plugin-annotation/scripts/v8.json +++ b/plugin-annotation/scripts/v8.json @@ -373,6 +373,10 @@ "type": "number", "doc": "Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)." }, + "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\"]]}`" + }, "lineMetrics": { "type": "boolean", "default": false, @@ -958,9 +962,27 @@ }, "property-type": "data-constant" }, + "symbol-sort-key": { + "type": "number", + "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.", + "sdk-support": { + "js": "0.53.0" + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom", + "feature" + ] + }, + "property-type": "data-driven" + }, "symbol-z-order": { "type": "enum", "values": { + "auto": { + "doc": "If `symbol-sort-key` is set, sort based on that. Otherwise sort symbols by their y-position relative to the viewport." + }, "viewport-y": { "doc": "Symbols will be sorted by their y-position relative to the viewport." }, @@ -968,11 +990,14 @@ "doc": "Symbols will be rendered in the same order as the source data with no sorting applied." } }, - "default": "viewport-y", + "default": "auto", "doc": "Controls the order in which overlapping symbols in the same layer are rendered", "sdk-support": { "basic functionality": { - "js": "0.49.0" + "js": "0.49.0", + "android": "6.6.0", + "ios": "4.5.0", + "macos": "0.12.0" }, "data-driven styling": {} }, @@ -1723,6 +1748,9 @@ "text-justify": { "type": "enum", "values": { + "auto": { + "doc": "The text is aligned towards the anchor position." + }, "left": { "doc": "The text is aligned to the left." }, @@ -1750,6 +1778,12 @@ "android": "5.2.0", "ios": "3.7.0", "macos": "0.6.0" + }, + "auto": { + "js": "next", + "android": "Not yet supported", + "ios": "Not yet supported", + "macos": "Not yet supported" } }, "expression": { @@ -1761,8 +1795,98 @@ }, "property-type": "data-driven" }, + "text-radial-offset": { + "type": "number", + "units": "ems", + "default": 0, + "doc": "Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which doesn't support the two-dimensional `text-offset`.", + "requires": [ + { + "!" : "text-offset" + } + ], + "property-type": "data-driven", + "expression": { + "interpolated": true, + "parameters": [ + "zoom", + "feature" + ] + } + }, + "text-variable-anchor": { + "type": "array", + "value": "enum", + "values": { + "center": { + "doc": "The center of the text is placed closest to the anchor." + }, + "left": { + "doc": "The left side of the text is placed closest to the anchor." + }, + "right": { + "doc": "The right side of the text is placed closest to the anchor." + }, + "top": { + "doc": "The top of the text is placed closest to the anchor." + }, + "bottom": { + "doc": "The bottom of the text is placed closest to the anchor." + }, + "top-left": { + "doc": "The top left corner of the text is placed closest to the anchor." + }, + "top-right": { + "doc": "The top right corner of the text is placed closest to the anchor." + }, + "bottom-left": { + "doc": "The bottom left corner of the text is placed closest to the anchor." + }, + "bottom-right": { + "doc": "The bottom right corner of the text is placed closest to the anchor." + } + }, + "requires": [ + { + "!": "text-anchor" + }, + { + "!": "text-offset" + }, + { + "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: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` instead of the two-dimensional `text-offset`.", + "sdk-support": { + "basic functionality": { + "js": "next", + "android": "Not yet supported", + "ios": "Not yet supported", + "macos": "Not yet supported" + }, + "data-driven styling": { + "js": "Not yet supported", + "android": "Not yet supported", + "ios": "Not yet supported", + "macos": "Not yet supported" + } + }, + "expression": { + "interpolated": false, + "parameters": [ + "zoom" + ] + }, + "property-type": "data-constant" + }, "text-anchor": { "type": "enum", + "requires": { + "!": "text-variable-anchor" + }, "values": { "center": { "doc": "The center of the text is placed closest to the anchor." @@ -1994,7 +2118,10 @@ 0 ], "requires": [ - "text-field" + "text-field", + { + "!": "text-radial-offset" + } ], "sdk-support": { "basic functionality": { @@ -2375,7 +2502,7 @@ } }, "case": { - "doc": "Selects the first output whose corresponding test condition evaluates to true.", + "doc": "Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.", "group": "Decision", "sdk-support": { "basic functionality": { @@ -2387,7 +2514,7 @@ } }, "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 either be a single literal value or an array of literal values (e.g. `\"a\"` or `[\"c\", \"b\"]`), and those values must be all strings or all numbers. (The values `\"1\"` and `1` cannot both be labels in the same match expression.) 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 * 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 deprecated `\"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.", "group": "Decision", "sdk-support": { "basic functionality": { @@ -2565,7 +2692,19 @@ "group": "Types", "sdk-support": { "basic functionality": { - "js": "0.48.0" + "js": "0.48.0", + "android": "6.7.0", + "ios": "4.6.0", + "macos": "0.12.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.", + "group": "Types", + "sdk-support": { + "basic functionality": { + "js": "0.54.0" } } }, @@ -2760,7 +2899,24 @@ }, "line-progress": { "doc": "Gets the progress along a gradient line. Can only be used in the `line-gradient` property.", - "group": "Heatmap" + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.45.0", + "android": "6.5.0", + "ios": "4.6.0", + "macos": "0.12.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.", + "group": "Feature data", + "sdk-support": { + "basic functionality": { + "js": "0.53.0" + } + } }, "+": { "doc": "Returns the sum of the inputs.", @@ -3771,7 +3927,9 @@ "transition": false, "sdk-support": { "basic functionality": { - "js": "0.50.0" + "js": "0.50.0", + "ios" : "4.7.0", + "macos" : "0.13.0" } }, "expression": { diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java index c6555df7b..e942a7ca8 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java @@ -43,6 +43,9 @@ public class Symbol extends Annotation { @Override void setUsedDataDrivenProperties() { + if (!(jsonObject.get(SymbolOptions.PROPERTY_SYMBOL_SORT_KEY) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_SYMBOL_SORT_KEY); + } if (!(jsonObject.get(SymbolOptions.PROPERTY_ICON_SIZE) instanceof JsonNull)) { annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_ICON_SIZE); } @@ -76,6 +79,9 @@ void setUsedDataDrivenProperties() { if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_JUSTIFY) instanceof JsonNull)) { annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_JUSTIFY); } + if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET) instanceof JsonNull)) { + annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET); + } if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_ANCHOR) instanceof JsonNull)) { annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_ANCHOR); } @@ -171,6 +177,33 @@ public int getZIndex() { // Property accessors + /** + * Get the SymbolSortKey property + *

+ * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement. + *

+ * + * @return property wrapper value around Float + */ + public Float getSymbolSortKey() { + return jsonObject.get(SymbolOptions.PROPERTY_SYMBOL_SORT_KEY).getAsFloat(); + } + + /** + * Set the SymbolSortKey property + *

+ * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement. + *

+ *

+ * To update the symbol on the map use {@link SymbolManager#update(Annotation)}. + *

+ * + * @param value constant property value for Float + */ + public void setSymbolSortKey(Float value) { + jsonObject.addProperty(SymbolOptions.PROPERTY_SYMBOL_SORT_KEY, value); + } + /** * Get the IconSize property *

@@ -481,6 +514,33 @@ public void setTextJustify(@Property.TEXT_JUSTIFY String value) { jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_JUSTIFY, value); } + /** + * Get the TextRadialOffset property + *

+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which doesn't support the two-dimensional {@link PropertyFactory#textOffset}. + *

+ * + * @return property wrapper value around Float + */ + public Float getTextRadialOffset() { + return jsonObject.get(SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET).getAsFloat(); + } + + /** + * Set the TextRadialOffset property + *

+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which doesn't support the two-dimensional {@link PropertyFactory#textOffset}. + *

+ *

+ * To update the symbol on the map use {@link SymbolManager#update(Annotation)}. + *

+ * + * @param value constant property value for Float + */ + public void setTextRadialOffset(Float value) { + jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET, value); + } + /** * Get the TextAnchor property *

diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java index 6bb43cf4d..18079fcf6 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java @@ -45,6 +45,7 @@ public class SymbolManager extends AnnotationManager * All supported properties are:
+ * SymbolOptions.PROPERTY_SYMBOL_SORT_KEY - Float
* SymbolOptions.PROPERTY_ICON_SIZE - Float
* SymbolOptions.PROPERTY_ICON_IMAGE - String
* SymbolOptions.PROPERTY_ICON_ROTATE - Float
@@ -228,6 +238,7 @@ protected void setDataDrivenPropertyIsUsed(@NonNull String property) { * SymbolOptions.PROPERTY_TEXT_MAX_WIDTH - Float
* SymbolOptions.PROPERTY_TEXT_LETTER_SPACING - Float
* SymbolOptions.PROPERTY_TEXT_JUSTIFY - String
+ * SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET - Float
* SymbolOptions.PROPERTY_TEXT_ANCHOR - String
* SymbolOptions.PROPERTY_TEXT_ROTATE - Float
* SymbolOptions.PROPERTY_TEXT_TRANSFORM - String
@@ -262,6 +273,7 @@ public List create(@NonNull String json) { * Symbols are going to be created only for features with a matching geometry. *

* All supported properties are:
+ * SymbolOptions.PROPERTY_SYMBOL_SORT_KEY - Float
* SymbolOptions.PROPERTY_ICON_SIZE - Float
* SymbolOptions.PROPERTY_ICON_IMAGE - String
* SymbolOptions.PROPERTY_ICON_ROTATE - Float
@@ -273,6 +285,7 @@ public List create(@NonNull String json) { * SymbolOptions.PROPERTY_TEXT_MAX_WIDTH - Float
* SymbolOptions.PROPERTY_TEXT_LETTER_SPACING - Float
* SymbolOptions.PROPERTY_TEXT_JUSTIFY - String
+ * SymbolOptions.PROPERTY_TEXT_RADIAL_OFFSET - Float
* SymbolOptions.PROPERTY_TEXT_ANCHOR - String
* SymbolOptions.PROPERTY_TEXT_ROTATE - Float
* SymbolOptions.PROPERTY_TEXT_TRANSFORM - String
@@ -712,6 +725,32 @@ public void setTextLineHeight( Float value) { layer.setProperties(propertyValue); } + /** + * Get the TextVariableAnchor property + *

+ * To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} instead of the two-dimensional {@link PropertyFactory#textOffset}. + *

+ * + * @return property wrapper value around String[] + */ + public String[] getTextVariableAnchor() { + return layer.getTextVariableAnchor().value; + } + + /** + * Set the TextVariableAnchor property + *

+ * To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} instead of the two-dimensional {@link PropertyFactory#textOffset}. + *

+ * + * @param value property wrapper value around String[] + */ + public void setTextVariableAnchor( String[] value) { + PropertyValue propertyValue = textVariableAnchor(value); + constantPropertyUsageMap.put(PROPERTY_TEXT_VARIABLE_ANCHOR, propertyValue); + layer.setProperties(propertyValue); + } + /** * Get the TextMaxAngle property *

diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java index 3ee39bb5d..2e995d03e 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java @@ -28,6 +28,7 @@ public class SymbolOptions extends Options { private boolean isDraggable; private JsonElement data; private Point geometry; + private Float symbolSortKey; private Float iconSize; private String iconImage; private Float iconRotate; @@ -39,6 +40,7 @@ public class SymbolOptions extends Options { private Float textMaxWidth; private Float textLetterSpacing; private String textJustify; + private Float textRadialOffset; private String textAnchor; private Float textRotate; private String textTransform; @@ -55,6 +57,7 @@ public class SymbolOptions extends Options { private Float textHaloBlur; private int zIndex; + static final String PROPERTY_SYMBOL_SORT_KEY = "symbol-sort-key"; static final String PROPERTY_ICON_SIZE = "icon-size"; static final String PROPERTY_ICON_IMAGE = "icon-image"; static final String PROPERTY_ICON_ROTATE = "icon-rotate"; @@ -66,6 +69,7 @@ public class SymbolOptions extends Options { static final String PROPERTY_TEXT_MAX_WIDTH = "text-max-width"; static final String PROPERTY_TEXT_LETTER_SPACING = "text-letter-spacing"; static final String PROPERTY_TEXT_JUSTIFY = "text-justify"; + static final String PROPERTY_TEXT_RADIAL_OFFSET = "text-radial-offset"; static final String PROPERTY_TEXT_ANCHOR = "text-anchor"; static final String PROPERTY_TEXT_ROTATE = "text-rotate"; static final String PROPERTY_TEXT_TRANSFORM = "text-transform"; @@ -83,6 +87,30 @@ public class SymbolOptions extends Options { static final String PROPERTY_Z_INDEX = "z-index"; private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; + /** + * Set symbol-sort-key to initialise the symbol with. + *

+ * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement. + *

+ * @param symbolSortKey the symbol-sort-key value + * @return this + */ + public SymbolOptions withSymbolSortKey(Float symbolSortKey) { + this.symbolSortKey = symbolSortKey; + return this; + } + + /** + * Get the current configured symbol-sort-key for the symbol + *

+ * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement. + *

+ * @return symbolSortKey value + */ + public Float getSymbolSortKey() { + return symbolSortKey; + } + /** * Set icon-size to initialise the symbol with. *

@@ -347,6 +375,30 @@ public String getTextJustify() { return textJustify; } + /** + * Set text-radial-offset to initialise the symbol with. + *

+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which doesn't support the two-dimensional {@link PropertyFactory#textOffset}. + *

+ * @param textRadialOffset the text-radial-offset value + * @return this + */ + public SymbolOptions withTextRadialOffset(Float textRadialOffset) { + this.textRadialOffset = textRadialOffset; + return this; + } + + /** + * Get the current configured text-radial-offset for the symbol + *

+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination with {@link PropertyFactory#textVariableAnchor}, which doesn't support the two-dimensional {@link PropertyFactory#textOffset}. + *

+ * @return textRadialOffset value + */ + public Float getTextRadialOffset() { + return textRadialOffset; + } + /** * Set text-anchor to initialise the symbol with. *

@@ -795,6 +847,7 @@ Symbol build(long id, AnnotationManager annotationManager throw new RuntimeException("geometry field is required"); } JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty(PROPERTY_SYMBOL_SORT_KEY, symbolSortKey); jsonObject.addProperty(PROPERTY_ICON_SIZE, iconSize); jsonObject.addProperty(PROPERTY_ICON_IMAGE, iconImage); jsonObject.addProperty(PROPERTY_ICON_ROTATE, iconRotate); @@ -806,6 +859,7 @@ Symbol build(long id, AnnotationManager annotationManager jsonObject.addProperty(PROPERTY_TEXT_MAX_WIDTH, textMaxWidth); jsonObject.addProperty(PROPERTY_TEXT_LETTER_SPACING, textLetterSpacing); jsonObject.addProperty(PROPERTY_TEXT_JUSTIFY, textJustify); + jsonObject.addProperty(PROPERTY_TEXT_RADIAL_OFFSET, textRadialOffset); jsonObject.addProperty(PROPERTY_TEXT_ANCHOR, textAnchor); jsonObject.addProperty(PROPERTY_TEXT_ROTATE, textRotate); jsonObject.addProperty(PROPERTY_TEXT_TRANSFORM, textTransform); @@ -843,6 +897,9 @@ static SymbolOptions fromFeature(@NonNull Feature feature) { SymbolOptions options = new SymbolOptions(); options.geometry = (Point) feature.geometry(); + if (feature.hasProperty(PROPERTY_SYMBOL_SORT_KEY)) { + options.symbolSortKey = feature.getProperty(PROPERTY_SYMBOL_SORT_KEY).getAsFloat(); + } if (feature.hasProperty(PROPERTY_ICON_SIZE)) { options.iconSize = feature.getProperty(PROPERTY_ICON_SIZE).getAsFloat(); } @@ -876,6 +933,9 @@ static SymbolOptions fromFeature(@NonNull Feature feature) { if (feature.hasProperty(PROPERTY_TEXT_JUSTIFY)) { options.textJustify = feature.getProperty(PROPERTY_TEXT_JUSTIFY).getAsString(); } + if (feature.hasProperty(PROPERTY_TEXT_RADIAL_OFFSET)) { + options.textRadialOffset = feature.getProperty(PROPERTY_TEXT_RADIAL_OFFSET).getAsFloat(); + } if (feature.hasProperty(PROPERTY_TEXT_ANCHOR)) { options.textAnchor = feature.getProperty(PROPERTY_TEXT_ANCHOR).getAsString(); } diff --git a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java index 23a1ccc23..5a42f530e 100644 --- a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java +++ b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java @@ -161,6 +161,7 @@ public void addSymbolFromFeatureCollection() { Geometry geometry = Point.fromLngLat(10, 10); Feature feature = Feature.fromGeometry(geometry); + feature.addNumberProperty("symbol-sort-key", 0.3f); feature.addNumberProperty("icon-size", 0.3f); feature.addStringProperty("icon-image", "undefined"); feature.addNumberProperty("icon-rotate", 0.3f); @@ -171,7 +172,8 @@ public void addSymbolFromFeatureCollection() { feature.addNumberProperty("text-size", 0.3f); feature.addNumberProperty("text-max-width", 0.3f); feature.addNumberProperty("text-letter-spacing", 0.3f); - feature.addStringProperty("text-justify", TEXT_JUSTIFY_LEFT); + feature.addStringProperty("text-justify", TEXT_JUSTIFY_AUTO); + feature.addNumberProperty("text-radial-offset", 0.3f); feature.addStringProperty("text-anchor", TEXT_ANCHOR_CENTER); feature.addNumberProperty("text-rotate", 0.3f); feature.addStringProperty("text-transform", TEXT_TRANSFORM_NONE); @@ -193,6 +195,7 @@ public void addSymbolFromFeatureCollection() { Symbol symbol = symbols.get(0); assertEquals(symbol.geometry, geometry); + assertEquals(symbol.getSymbolSortKey(), 0.3f); assertEquals(symbol.getIconSize(), 0.3f); assertEquals(symbol.getIconImage(), "undefined"); assertEquals(symbol.getIconRotate(), 0.3f); @@ -205,7 +208,8 @@ public void addSymbolFromFeatureCollection() { assertEquals(symbol.getTextSize(), 0.3f); assertEquals(symbol.getTextMaxWidth(), 0.3f); assertEquals(symbol.getTextLetterSpacing(), 0.3f); - assertEquals(symbol.getTextJustify(), TEXT_JUSTIFY_LEFT); + assertEquals(symbol.getTextJustify(), TEXT_JUSTIFY_AUTO); + assertEquals(symbol.getTextRadialOffset(), 0.3f); assertEquals(symbol.getTextAnchor(), TEXT_ANCHOR_CENTER); assertEquals(symbol.getTextRotate(), 0.3f); assertEquals(symbol.getTextTransform(), TEXT_TRANSFORM_NONE); @@ -283,6 +287,19 @@ public void testSymbolDraggableFlag() { } + @Test + public void testSymbolSortKeyLayerProperty() { + symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); + verify(symbolLayer, times(0)).setProperties(argThat(new PropertyValueMatcher(symbolSortKey(get("symbol-sort-key"))))); + + SymbolOptions options = new SymbolOptions().withLatLng(new LatLng()).withSymbolSortKey(0.3f); + symbolManager.create(options); + verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolSortKey(get("symbol-sort-key"))))); + + symbolManager.create(options); + verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolSortKey(get("symbol-sort-key"))))); + } + @Test public void testIconSizeLayerProperty() { symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); @@ -418,7 +435,7 @@ public void testTextJustifyLayerProperty() { symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); verify(symbolLayer, times(0)).setProperties(argThat(new PropertyValueMatcher(textJustify(get("text-justify"))))); - SymbolOptions options = new SymbolOptions().withLatLng(new LatLng()).withTextJustify(TEXT_JUSTIFY_LEFT); + SymbolOptions options = new SymbolOptions().withLatLng(new LatLng()).withTextJustify(TEXT_JUSTIFY_AUTO); symbolManager.create(options); verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(textJustify(get("text-justify"))))); @@ -426,6 +443,19 @@ public void testTextJustifyLayerProperty() { verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(textJustify(get("text-justify"))))); } + @Test + public void testTextRadialOffsetLayerProperty() { + symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); + verify(symbolLayer, times(0)).setProperties(argThat(new PropertyValueMatcher(textRadialOffset(get("text-radial-offset"))))); + + SymbolOptions options = new SymbolOptions().withLatLng(new LatLng()).withTextRadialOffset(0.3f); + symbolManager.create(options); + verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(textRadialOffset(get("text-radial-offset"))))); + + symbolManager.create(options); + verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(textRadialOffset(get("text-radial-offset"))))); + } + @Test public void testTextAnchorLayerProperty() { symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); From 1f95d6189480c5953443fb1792fdc22fd6c13f59 Mon Sep 17 00:00:00 2001 From: tobrun Date: Thu, 16 May 2019 15:06:06 +0200 Subject: [PATCH 2/4] [annotation] - migrate to mapbox-gl-js submodule for referencing style spec --- .gitmodules | 3 + plugin-annotation/gl-js | 1 + plugin-annotation/scripts/code-gen.js | 2 +- plugin-annotation/scripts/v8.json | 5685 ------------------------- 4 files changed, 5 insertions(+), 5686 deletions(-) create mode 100644 .gitmodules create mode 160000 plugin-annotation/gl-js delete mode 100644 plugin-annotation/scripts/v8.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..db2eb92e7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "plugin-annotation/gl-js"] + path = plugin-annotation/gl-js + url = https://github.com/mapbox/mapbox-gl-js diff --git a/plugin-annotation/gl-js b/plugin-annotation/gl-js new file mode 160000 index 000000000..429633d69 --- /dev/null +++ b/plugin-annotation/gl-js @@ -0,0 +1 @@ +Subproject commit 429633d6971b7ce7faa88bbb1f237e4087ce7a19 diff --git a/plugin-annotation/scripts/code-gen.js b/plugin-annotation/scripts/code-gen.js index b32c678f9..13b447273 100644 --- a/plugin-annotation/scripts/code-gen.js +++ b/plugin-annotation/scripts/code-gen.js @@ -3,7 +3,7 @@ const fs = require('fs'); const ejs = require('ejs'); -const spec = require('./v8'); +const spec = require('./../gl-js/src/style-spec/reference/v8'); const _ = require('lodash'); const path = require('path'); diff --git a/plugin-annotation/scripts/v8.json b/plugin-annotation/scripts/v8.json deleted file mode 100644 index 2fca311c3..000000000 --- a/plugin-annotation/scripts/v8.json +++ /dev/null @@ -1,5685 +0,0 @@ -{ - "$version": 8, - "$root": { - "version": { - "required": true, - "type": "enum", - "values": [ - 8 - ], - "doc": "Style specification version number. Must be 8.", - "example": 8 - }, - "name": { - "type": "string", - "doc": "A human-readable name for the style.", - "example": "Bright" - }, - "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:'." - }, - "center": { - "type": "array", - "value": "number", - "doc": "Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", - "example": [ - -73.9749, - 40.7736 - ] - }, - "zoom": { - "type": "number", - "doc": "Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", - "example": 12.5 - }, - "bearing": { - "type": "number", - "default": 0, - "period": 360, - "units": "degrees", - "doc": "Default bearing, in degrees. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", - "example": 29 - }, - "pitch": { - "type": "number", - "default": 0, - "units": "degrees", - "doc": "Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", - "example": 50 - }, - "light": { - "type": "light", - "doc": "The global light source.", - "example": { - "anchor": "viewport", - "color": "white", - "intensity": 0.4 - } - }, - "sources": { - "required": true, - "type": "sources", - "doc": "Data source specifications.", - "example": { - "mapbox-streets": { - "type": "vector", - "url": "mapbox://mapbox.mapbox-streets-v6" - } - } - }, - "sprite": { - "type": "string", - "doc": "A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).", - "example": "mapbox://sprites/mapbox/bright-v8" - }, - "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).", - "example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf" - }, - "transition": { - "type": "transition", - "doc": "A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.", - "example": { - "duration": 300, - "delay": 0 - } - }, - "layers": { - "required": true, - "type": "array", - "value": "layer", - "doc": "Layers will be drawn in the order of this array.", - "example": [ - { - "id": "water", - "source": "mapbox-streets", - "source-layer": "water", - "type": "fill", - "paint": { - "fill-color": "#00ffff" - } - } - ] - } - }, - "sources": { - "*": { - "type": "source", - "doc": "Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided." - } - }, - "source": [ - "source_vector", - "source_raster", - "source_raster_dem", - "source_geojson", - "source_video", - "source_image" - ], - "source_vector": { - "type": { - "required": true, - "type": "enum", - "values": { - "vector": { - "doc": "A vector tile source." - } - }, - "doc": "The type of the source." - }, - "url": { - "type": "string", - "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." - }, - "tiles": { - "type": "array", - "value": "string", - "doc": "An array of one or more tile source URLs, as in the TileJSON spec." - }, - "bounds": { - "type": "array", - "value": "number", - "length": 4, - "default": [ - -180, - -85.051129, - 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 Mapbox GL." - }, - "scheme": { - "type": "enum", - "values": { - "xyz": { - "doc": "Slippy map tilenames scheme." - }, - "tms": { - "doc": "OSGeo spec scheme." - } - }, - "default": "xyz", - "doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed." - }, - "minzoom": { - "type": "number", - "default": 0, - "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." - }, - "maxzoom": { - "type": "number", - "default": 22, - "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." - }, - "attribution": { - "type": "string", - "doc": "Contains an attribution to be displayed when the map is shown to a user." - }, - "*": { - "type": "*", - "doc": "Other keys to configure the data source." - } - }, - "source_raster": { - "type": { - "required": true, - "type": "enum", - "values": { - "raster": { - "doc": "A raster tile source." - } - }, - "doc": "The type of the source." - }, - "url": { - "type": "string", - "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." - }, - "tiles": { - "type": "array", - "value": "string", - "doc": "An array of one or more tile source URLs, as in the TileJSON spec." - }, - "bounds": { - "type": "array", - "value": "number", - "length": 4, - "default": [ - -180, - -85.051129, - 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 Mapbox GL." - }, - "minzoom": { - "type": "number", - "default": 0, - "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." - }, - "maxzoom": { - "type": "number", - "default": 22, - "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." - }, - "tileSize": { - "type": "number", - "default": 512, - "units": "pixels", - "doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers." - }, - "scheme": { - "type": "enum", - "values": { - "xyz": { - "doc": "Slippy map tilenames scheme." - }, - "tms": { - "doc": "OSGeo spec scheme." - } - }, - "default": "xyz", - "doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed." - }, - "attribution": { - "type": "string", - "doc": "Contains an attribution to be displayed when the map is shown to a user." - }, - "*": { - "type": "*", - "doc": "Other keys to configure the data source." - } - }, - "source_raster_dem": { - "type": { - "required": true, - "type": "enum", - "values": { - "raster-dem": { - "doc": "A RGB-encoded raster DEM source" - } - }, - "doc": "The type of the source." - }, - "url": { - "type": "string", - "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." - }, - "tiles": { - "type": "array", - "value": "string", - "doc": "An array of one or more tile source URLs, as in the TileJSON spec." - }, - "bounds": { - "type": "array", - "value": "number", - "length": 4, - "default": [ - -180, - -85.051129, - 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 Mapbox GL." - }, - "minzoom": { - "type": "number", - "default": 0, - "doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec." - }, - "maxzoom": { - "type": "number", - "default": 22, - "doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels." - }, - "tileSize": { - "type": "number", - "default": 512, - "units": "pixels", - "doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers." - }, - "attribution": { - "type": "string", - "doc": "Contains an attribution to be displayed when the map is shown to a user." - }, - "encoding": { - "type": "enum", - "values": { - "terrarium": { - "doc": "Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info." - }, - "mapbox": { - "doc": "Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info." - } - }, - "default": "mapbox", - "doc": "The encoding used by this source. Mapbox Terrain RGB is used by default" - }, - "*": { - "type": "*", - "doc": "Other keys to configure the data source." - } - }, - "source_geojson": { - "type": { - "required": true, - "type": "enum", - "values": { - "geojson": { - "doc": "A GeoJSON data source." - } - }, - "doc": "The data type of the GeoJSON source." - }, - "data": { - "type": "*", - "doc": "A URL to a GeoJSON file, or inline GeoJSON." - }, - "maxzoom": { - "type": "number", - "default": 18, - "doc": "Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)." - }, - "attribution": { - "type": "string", - "doc": "Contains an attribution to be displayed when the map is shown to a user." - }, - "buffer": { - "type": "number", - "default": 128, - "maximum": 512, - "minimum": 0, - "doc": "Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance." - }, - "tolerance": { - "type": "number", - "default": 0.375, - "doc": "Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)." - }, - "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" - }, - "clusterRadius": { - "type": "number", - "default": 50, - "minimum": 0, - "doc": "Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile." - }, - "clusterMaxZoom": { - "type": "number", - "doc": "Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered)." - }, - "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\"]]}`" - }, - "lineMetrics": { - "type": "boolean", - "default": false, - "doc": "Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values." - }, - "generateId": { - "type": "boolean", - "default": false, - "doc": "Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values." - } - }, - "source_video": { - "type": { - "required": true, - "type": "enum", - "values": { - "video": { - "doc": "A video data source." - } - }, - "doc": "The data type of the video source." - }, - "urls": { - "required": true, - "type": "array", - "value": "string", - "doc": "URLs to video content in order of preferred format." - }, - "coordinates": { - "required": true, - "doc": "Corners of video specified in longitude, latitude pairs.", - "type": "array", - "length": 4, - "value": { - "type": "array", - "length": 2, - "value": "number", - "doc": "A single longitude, latitude pair." - } - } - }, - "source_image": { - "type": { - "required": true, - "type": "enum", - "values": { - "image": { - "doc": "An image data source." - } - }, - "doc": "The data type of the image source." - }, - "url": { - "required": true, - "type": "string", - "doc": "URL that points to an image." - }, - "coordinates": { - "required": true, - "doc": "Corners of image specified in longitude, latitude pairs.", - "type": "array", - "length": 4, - "value": { - "type": "array", - "length": 2, - "value": "number", - "doc": "A single longitude, latitude pair." - } - } - }, - "layer": { - "id": { - "type": "string", - "doc": "Unique layer name.", - "required": true - }, - "type": { - "type": "enum", - "values": { - "fill": { - "doc": "A filled polygon with an optional stroked border.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - }, - "line": { - "doc": "A stroked line.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - }, - "symbol": { - "doc": "An icon or a text label.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - }, - "circle": { - "doc": "A filled circle.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - }, - "heatmap": { - "doc": "A heatmap.", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "fill-extrusion": { - "doc": "An extruded (3D) polygon.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - } - }, - "raster": { - "doc": "Raster map textures such as satellite imagery.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - }, - "hillshade": { - "doc": "Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.", - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "background": { - "doc": "The background color or pattern of the map.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - } - } - }, - "doc": "Rendering type of this layer.", - "required": true - }, - "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:'." - }, - "source": { - "type": "string", - "doc": "Name of a source description to be used for this layer. Required for all layer types except `background`." - }, - "source-layer": { - "type": "string", - "doc": "Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources." - }, - "minzoom": { - "type": "number", - "minimum": 0, - "maximum": 24, - "doc": "The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden." - }, - "maxzoom": { - "type": "number", - "minimum": 0, - "maximum": 24, - "doc": "The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden." - }, - "filter": { - "type": "filter", - "doc": "A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions." - }, - "layout": { - "type": "layout", - "doc": "Layout properties for the layer." - }, - "paint": { - "type": "paint", - "doc": "Default paint properties for this layer." - } - }, - "layout": [ - "layout_fill", - "layout_line", - "layout_circle", - "layout_heatmap", - "layout_fill-extrusion", - "layout_symbol", - "layout_raster", - "layout_hillshade", - "layout_background" - ], - "layout_background": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "property-type": "constant" - } - }, - "layout_fill": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "property-type": "constant" - } - }, - "layout_circle": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "property-type": "constant" - } - }, - "layout_heatmap": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - }, - "property-type": "constant" - } - }, - "layout_fill-extrusion": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "property-type": "constant" - } - }, - "layout_line": { - "line-cap": { - "type": "enum", - "values": { - "butt": { - "doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line." - }, - "round": { - "doc": "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." - }, - "square": { - "doc": "A cap 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." - } - }, - "default": "butt", - "doc": "The display of line endings.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "line-join": { - "type": "enum", - "values": { - "bevel": { - "doc": "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." - }, - "round": { - "doc": "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." - }, - "miter": { - "doc": "A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet." - } - }, - "default": "miter", - "doc": "The display of lines when joining.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.40.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "line-miter-limit": { - "type": "number", - "default": 2, - "doc": "Used to automatically convert miter joins to bevel joins for sharp angles.", - "requires": [ - { - "line-join": "miter" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "line-round-limit": { - "type": "number", - "default": 1.05, - "doc": "Used to automatically convert round joins to miter joins for shallow angles.", - "requires": [ - { - "line-join": "round" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "property-type": "constant" - } - }, - "layout_symbol": { - "symbol-placement": { - "type": "enum", - "values": { - "point": { - "doc": "The label is placed at the point where the geometry is located." - }, - "line": { - "doc": "The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries." - }, - "line-center": { - "doc": "The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries." - } - }, - "default": "point", - "doc": "Label placement relative to its geometry.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "`line-center` value": { - "js": "0.47.0", - "android": "6.4.0", - "ios": "4.3.0", - "macos": "0.10.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "symbol-spacing": { - "type": "number", - "default": 250, - "minimum": 1, - "units": "pixels", - "doc": "Distance between two symbol anchors.", - "requires": [ - { - "symbol-placement": "line" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "symbol-avoid-edges": { - "type": "boolean", - "default": false, - "doc": "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.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "symbol-sort-key": { - "type": "number", - "doc": "Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.", - "sdk-support": { - "js": "0.53.0" - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "symbol-z-order": { - "type": "enum", - "values": { - "auto": { - "doc": "If `symbol-sort-key` is set, sort based on that. Otherwise sort symbols by their y-position relative to the viewport." - }, - "viewport-y": { - "doc": "Symbols will be sorted by their y-position relative to the viewport." - }, - "source": { - "doc": "Symbols will be rendered in the same order as the source data with no sorting applied." - } - }, - "default": "auto", - "doc": "Controls the order in which overlapping symbols in the same layer are rendered", - "sdk-support": { - "basic functionality": { - "js": "0.49.0", - "android": "6.6.0", - "ios": "4.5.0", - "macos": "0.12.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-allow-overlap": { - "type": "boolean", - "default": false, - "doc": "If true, the icon will be visible even if it collides with other previously drawn symbols.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-ignore-placement": { - "type": "boolean", - "default": false, - "doc": "If true, other symbols can be visible even if they collide with the icon.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-optional": { - "type": "boolean", - "default": false, - "doc": "If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.", - "requires": [ - "icon-image", - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-rotation-alignment": { - "type": "enum", - "values": { - "map": { - "doc": "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." - }, - "viewport": { - "doc": "Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." - }, - "auto": { - "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`." - } - }, - "default": "auto", - "doc": "In combination with `symbol-placement`, determines the rotation behavior of icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "`auto` value": { - "js": "0.25.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.3.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-size": { - "type": "number", - "default": 1, - "minimum": 0, - "units": "factor of the original icon size", - "doc": "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 `icon-size`. 1 is the original size; 3 triples the size of the image.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.35.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "icon-text-fit": { - "type": "enum", - "values": { - "none": { - "doc": "The icon is displayed at its intrinsic aspect ratio." - }, - "width": { - "doc": "The icon is scaled in the x-dimension to fit the width of the text." - }, - "height": { - "doc": "The icon is scaled in the y-dimension to fit the height of the text." - }, - "both": { - "doc": "The icon is scaled in both x- and y-dimensions." - } - }, - "default": "none", - "doc": "Scales the icon to fit around the associated text.", - "requires": [ - "icon-image", - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.2.1" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-text-fit-padding": { - "type": "array", - "value": "number", - "length": 4, - "default": [ - 0, - 0, - 0, - 0 - ], - "units": "pixels", - "doc": "Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.", - "requires": [ - "icon-image", - "text-field", - { - "icon-text-fit": [ - "both", - "width", - "height" - ] - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.2.1" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-image": { - "type": "string", - "doc": "Name of image in sprite to use for drawing an image background.", - "tokens": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.35.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "icon-rotate": { - "type": "number", - "default": 0, - "period": 360, - "units": "degrees", - "doc": "Rotates the icon clockwise.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.21.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "icon-padding": { - "type": "number", - "default": 2, - "minimum": 0, - "units": "pixels", - "doc": "Size of the additional area around the icon bounding box used for detecting symbol collisions.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-keep-upright": { - "type": "boolean", - "default": false, - "doc": "If true, the icon may be flipped to prevent it from being rendered upside-down.", - "requires": [ - "icon-image", - { - "icon-rotation-alignment": "map" - }, - { - "symbol-placement": [ - "line", - "line-center" - ] - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-offset": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "doc": "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 `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "icon-anchor": { - "type": "enum", - "values": { - "center": { - "doc": "The center of the icon is placed closest to the anchor." - }, - "left": { - "doc": "The left side of the icon is placed closest to the anchor." - }, - "right": { - "doc": "The right side of the icon is placed closest to the anchor." - }, - "top": { - "doc": "The top of the icon is placed closest to the anchor." - }, - "bottom": { - "doc": "The bottom of the icon is placed closest to the anchor." - }, - "top-left": { - "doc": "The top left corner of the icon is placed closest to the anchor." - }, - "top-right": { - "doc": "The top right corner of the icon is placed closest to the anchor." - }, - "bottom-left": { - "doc": "The bottom left corner of the icon is placed closest to the anchor." - }, - "bottom-right": { - "doc": "The bottom right corner of the icon is placed closest to the anchor." - } - }, - "default": "center", - "doc": "Part of the icon placed closest to the anchor.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.40.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - }, - "data-driven styling": { - "js": "0.40.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "icon-pitch-alignment": { - "type": "enum", - "values": { - "map": { - "doc": "The icon is aligned to the plane of the map." - }, - "viewport": { - "doc": "The icon is aligned to the plane of the viewport." - }, - "auto": { - "doc": "Automatically matches the value of `icon-rotation-alignment`." - } - }, - "default": "auto", - "doc": "Orientation of icon when map is pitched.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.39.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-pitch-alignment": { - "type": "enum", - "values": { - "map": { - "doc": "The text is aligned to the plane of the map." - }, - "viewport": { - "doc": "The text is aligned to the plane of the viewport." - }, - "auto": { - "doc": "Automatically matches the value of `text-rotation-alignment`." - } - }, - "default": "auto", - "doc": "Orientation of text when map is pitched.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.2.1" - }, - "`auto` value": { - "js": "0.25.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.3.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-rotation-alignment": { - "type": "enum", - "values": { - "map": { - "doc": "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." - }, - "viewport": { - "doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." - }, - "auto": { - "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`." - } - }, - "default": "auto", - "doc": "In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "`auto` value": { - "js": "0.25.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.3.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-field": { - "type": "formatted", - "default": "", - "tokens": true, - "doc": "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.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-font": { - "type": "array", - "value": "string", - "default": [ - "Open Sans Regular", - "Arial Unicode MS Regular" - ], - "doc": "Font stack to use for displaying text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-size": { - "type": "number", - "default": 16, - "minimum": 0, - "units": "pixels", - "doc": "Font size.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.35.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-max-width": { - "type": "number", - "default": 10, - "minimum": 0, - "units": "ems", - "doc": "The maximum line width for text wrapping.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.40.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-line-height": { - "type": "number", - "default": 1.2, - "units": "ems", - "doc": "Text leading value for multi-line text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-letter-spacing": { - "type": "number", - "default": 0, - "units": "ems", - "doc": "Text tracking amount.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.40.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-justify": { - "type": "enum", - "values": { - "auto": { - "doc": "The text is aligned towards the anchor position." - }, - "left": { - "doc": "The text is aligned to the left." - }, - "center": { - "doc": "The text is centered." - }, - "right": { - "doc": "The text is aligned to the right." - } - }, - "default": "center", - "doc": "Text justification options.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.39.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - }, - "auto": { - "js": "next", - "android": "Not yet supported", - "ios": "Not yet supported", - "macos": "Not yet supported" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-radial-offset": { - "type": "number", - "units": "ems", - "default": 0, - "doc": "Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which doesn't support the two-dimensional `text-offset`.", - "requires": [ - { - "!" : "text-offset" - } - ], - "property-type": "data-driven", - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - } - }, - "text-variable-anchor": { - "type": "array", - "value": "enum", - "values": { - "center": { - "doc": "The center of the text is placed closest to the anchor." - }, - "left": { - "doc": "The left side of the text is placed closest to the anchor." - }, - "right": { - "doc": "The right side of the text is placed closest to the anchor." - }, - "top": { - "doc": "The top of the text is placed closest to the anchor." - }, - "bottom": { - "doc": "The bottom of the text is placed closest to the anchor." - }, - "top-left": { - "doc": "The top left corner of the text is placed closest to the anchor." - }, - "top-right": { - "doc": "The top right corner of the text is placed closest to the anchor." - }, - "bottom-left": { - "doc": "The bottom left corner of the text is placed closest to the anchor." - }, - "bottom-right": { - "doc": "The bottom right corner of the text is placed closest to the anchor." - } - }, - "requires": [ - { - "!": "text-anchor" - }, - { - "!": "text-offset" - }, - { - "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: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` instead of the two-dimensional `text-offset`.", - "sdk-support": { - "basic functionality": { - "js": "next", - "android": "Not yet supported", - "ios": "Not yet supported", - "macos": "Not yet supported" - }, - "data-driven styling": { - "js": "Not yet supported", - "android": "Not yet supported", - "ios": "Not yet supported", - "macos": "Not yet supported" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-anchor": { - "type": "enum", - "requires": { - "!": "text-variable-anchor" - }, - "values": { - "center": { - "doc": "The center of the text is placed closest to the anchor." - }, - "left": { - "doc": "The left side of the text is placed closest to the anchor." - }, - "right": { - "doc": "The right side of the text is placed closest to the anchor." - }, - "top": { - "doc": "The top of the text is placed closest to the anchor." - }, - "bottom": { - "doc": "The bottom of the text is placed closest to the anchor." - }, - "top-left": { - "doc": "The top left corner of the text is placed closest to the anchor." - }, - "top-right": { - "doc": "The top right corner of the text is placed closest to the anchor." - }, - "bottom-left": { - "doc": "The bottom left corner of the text is placed closest to the anchor." - }, - "bottom-right": { - "doc": "The bottom right corner of the text is placed closest to the anchor." - } - }, - "default": "center", - "doc": "Part of the text placed closest to the anchor.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.39.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-max-angle": { - "type": "number", - "default": 45, - "units": "degrees", - "doc": "Maximum angle change between adjacent characters.", - "requires": [ - "text-field", - { - "symbol-placement": [ - "line", - "line-center" - ] - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-rotate": { - "type": "number", - "default": 0, - "period": 360, - "units": "degrees", - "doc": "Rotates the text clockwise.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.35.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-padding": { - "type": "number", - "default": 2, - "minimum": 0, - "units": "pixels", - "doc": "Size of the additional area around the text bounding box used for detecting symbol collisions.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-keep-upright": { - "type": "boolean", - "default": true, - "doc": "If true, the text may be flipped vertically to prevent it from being rendered upside-down.", - "requires": [ - "text-field", - { - "text-rotation-alignment": "map" - }, - { - "symbol-placement": [ - "line", - "line-center" - ] - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-transform": { - "type": "enum", - "values": { - "none": { - "doc": "The text is not altered." - }, - "uppercase": { - "doc": "Forces all letters to be displayed in uppercase." - }, - "lowercase": { - "doc": "Forces all letters to be displayed in lowercase." - } - }, - "default": "none", - "doc": "Specifies how to capitalize text, similar to the CSS `text-transform` property.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-offset": { - "type": "array", - "doc": "Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.", - "value": "number", - "units": "ems", - "length": 2, - "default": [ - 0, - 0 - ], - "requires": [ - "text-field", - { - "!": "text-radial-offset" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.35.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "data-driven" - }, - "text-allow-overlap": { - "type": "boolean", - "default": false, - "doc": "If true, the text will be visible even if it collides with other previously drawn symbols.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-ignore-placement": { - "type": "boolean", - "default": false, - "doc": "If true, other symbols can be visible even if they collide with the text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-optional": { - "type": "boolean", - "default": false, - "doc": "If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.", - "requires": [ - "text-field", - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "property-type": "constant" - } - }, - "layout_raster": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "property-type": "constant" - } - }, - "layout_hillshade": { - "visibility": { - "type": "enum", - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "property-type": "constant" - } - }, - "filter": { - "type": "array", - "value": "*", - "doc": "A filter selects specific features from a layer." - }, - "filter_operator": { - "type": "enum", - "values": { - "==": { - "doc": "`[\"==\", key, value]` equality: `feature[key] = value`" - }, - "!=": { - "doc": "`[\"!=\", key, value]` inequality: `feature[key] ≠ value`" - }, - ">": { - "doc": "`[\">\", key, value]` greater than: `feature[key] > value`" - }, - ">=": { - "doc": "`[\">=\", key, value]` greater than or equal: `feature[key] ≥ value`" - }, - "<": { - "doc": "`[\"<\", key, value]` less than: `feature[key] < value`" - }, - "<=": { - "doc": "`[\"<=\", key, value]` less than or equal: `feature[key] ≤ value`" - }, - "in": { - "doc": "`[\"in\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`" - }, - "!in": { - "doc": "`[\"!in\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`" - }, - "all": { - "doc": "`[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`" - }, - "any": { - "doc": "`[\"any\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`" - }, - "none": { - "doc": "`[\"none\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`" - }, - "has": { - "doc": "`[\"has\", key]` `feature[key]` exists" - }, - "!has": { - "doc": "`[\"!has\", key]` `feature[key]` does not exist" - } - }, - "doc": "The filter operator." - }, - "geometry_type": { - "type": "enum", - "values": { - "Point": { - "doc": "Filter to point geometries." - }, - "LineString": { - "doc": "Filter to line geometries." - }, - "Polygon": { - "doc": "Filter to polygon geometries." - } - }, - "doc": "The geometry type for the filter to select." - }, - "function": { - "expression": { - "type": "expression", - "doc": "An expression." - }, - "stops": { - "type": "array", - "doc": "An array of stops.", - "value": "function_stop" - }, - "base": { - "type": "number", - "default": 1, - "minimum": 0, - "doc": "The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly." - }, - "property": { - "type": "string", - "doc": "The name of a feature property to use as the function input.", - "default": "$zoom" - }, - "type": { - "type": "enum", - "values": { - "identity": { - "doc": "Return the input value as the output value." - }, - "exponential": { - "doc": "Generate an output by interpolating between stops just less than and just greater than the function input." - }, - "interval": { - "doc": "Return the output value of the stop just less than the function input." - }, - "categorical": { - "doc": "Return the output value of the stop equal to the function input." - } - }, - "doc": "The interpolation strategy to use in function evaluation.", - "default": "exponential" - }, - "colorSpace": { - "type": "enum", - "values": { - "rgb": { - "doc": "Use the RGB color space to interpolate color values" - }, - "lab": { - "doc": "Use the LAB color space to interpolate color values." - }, - "hcl": { - "doc": "Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually." - } - }, - "doc": "The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.", - "default": "rgb" - }, - "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." - } - }, - "function_stop": { - "type": "array", - "minimum": 0, - "maximum": 22, - "value": [ - "number", - "color" - ], - "length": 2, - "doc": "Zoom level and value pair." - }, - "expression": { - "type": "array", - "value": "*", - "minimum": 1, - "doc": "An expression defines a function that can be used for data-driven style properties or feature filters." - }, - "expression_name": { - "doc": "", - "type": "enum", - "values": { - "let": { - "doc": "Binds expressions to named variables, which can then be referenced in the result expression using [\"var\", \"variable_name\"].", - "group": "Variable binding", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "var": { - "doc": "References variable bound using \"let\".", - "group": "Variable binding", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "literal": { - "doc": "Provides a literal array or object value.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "at": { - "doc": "Retrieves an item from an array.", - "group": "Lookup", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "case": { - "doc": "Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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 deprecated `\"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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "coalesce": { - "doc": "Evaluates each expression in turn until the first non-null value is obtained, and returns that value.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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 input if the input is less than the first stop.", - "group": "Ramps, scales, curves", - "sdk-support": { - "basic functionality": { - "js": "0.42.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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\"]`: 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.", - "group": "Ramps, scales, curves", - "sdk-support": { - "basic functionality": { - "js": "0.42.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Ramps, scales, curves", - "sdk-support": { - "basic functionality": { - "js": "0.49.0" - } - } - }, - "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.", - "group": "Ramps, scales, curves", - "sdk-support": { - "basic functionality": { - "js": "0.49.0" - } - } - }, - "ln2": { - "doc": "Returns mathematical constant ln(2).", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "pi": { - "doc": "Returns the mathematical constant pi.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "e": { - "doc": "Returns the mathematical constant e.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "typeof": { - "doc": "Returns a string describing the type of the given value.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.0" - } - } - }, - "format": { - "doc": "Returns `formatted` text containing annotations for use in mixed-format `text-field` entries. If set, the `text-font` argument overrides the font specified by the root layout properties. If set, the `font-scale` argument specifies a scaling factor relative to the `text-size` specified in the root layout properties.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.48.0", - "android": "6.7.0", - "ios": "4.6.0", - "macos": "0.12.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.54.0" - } - } - }, - "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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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`.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "to-rgba": { - "doc": "Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.", - "group": "Color", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Types", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Color", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Color", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Lookup", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Lookup", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "length": { - "doc": "Gets the length of an array or string.", - "group": "Lookup", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "properties": { - "doc": "Gets the feature properties object. Note that in some cases, it may be more efficient to use [\"get\", \"property_name\"] directly.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.46.0" - } - } - }, - "geometry-type": { - "doc": "Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "id": { - "doc": "Gets the feature's id, if it has one.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Zoom", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Heatmap", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "line-progress": { - "doc": "Gets the progress along a gradient line. Can only be used in the `line-gradient` property.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.6.0", - "macos": "0.12.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.", - "group": "Feature data", - "sdk-support": { - "basic functionality": { - "js": "0.53.0" - } - } - }, - "+": { - "doc": "Returns the sum of the inputs.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "*": { - "doc": "Returns the product of the inputs.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "/": { - "doc": "Returns the result of floating point division of the first input by the second.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "%": { - "doc": "Returns the remainder after integer division of the first input by the second.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "^": { - "doc": "Returns the result of raising the first input to the power specified by the second.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "sqrt": { - "doc": "Returns the square root of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.42.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "log10": { - "doc": "Returns the base-ten logarithm of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "ln": { - "doc": "Returns the natural logarithm of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "log2": { - "doc": "Returns the base-two logarithm of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "sin": { - "doc": "Returns the sine of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "cos": { - "doc": "Returns the cosine of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "tan": { - "doc": "Returns the tangent of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "asin": { - "doc": "Returns the arcsine of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "acos": { - "doc": "Returns the arccosine of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "atan": { - "doc": "Returns the arctangent of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "min": { - "doc": "Returns the minimum value of the inputs.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "max": { - "doc": "Returns the maximum value of the inputs.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "abs": { - "doc": "Returns the absolute value of the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "ceil": { - "doc": "Returns the smallest integer that is greater than or equal to the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "floor": { - "doc": "Returns the largest integer that is less than or equal to the input.", - "group": "Math", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "collator": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - } - }, - "!": { - "doc": "Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.", - "group": "Decision", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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 Mapbox GL JS).", - "group": "String" - }, - "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.", - "group": "String", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "String", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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`.", - "group": "String", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.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.", - "group": "String", - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.2.0", - "macos": "0.9.0" - } - } - } - } - }, - "light": { - "anchor": { - "type": "enum", - "default": "viewport", - "values": { - "map": { - "doc": "The position of the light source is aligned to the rotation of the map." - }, - "viewport": { - "doc": "The position of the light source is aligned to the rotation of the viewport." - } - }, - "property-type": "data-constant", - "transition": false, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "doc": "Whether extruded geometries are lit relative to the map or viewport.", - "example": "map", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - } - }, - "position": { - "type": "array", - "default": [ - 1.15, - 210, - 30 - ], - "length": 3, - "value": "number", - "property-type": "data-constant", - "transition": true, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "doc": "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).", - "example": [ - 1.5, - 90, - 80 - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - } - }, - "color": { - "type": "color", - "property-type": "data-constant", - "default": "#ffffff", - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "transition": true, - "doc": "Color tint for lighting extruded geometries.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - } - }, - "intensity": { - "type": "number", - "property-type": "data-constant", - "default": 0.5, - "minimum": 0, - "maximum": 1, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "transition": true, - "doc": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - } - } - }, - "paint": [ - "paint_fill", - "paint_line", - "paint_circle", - "paint_heatmap", - "paint_fill-extrusion", - "paint_symbol", - "paint_raster", - "paint_hillshade", - "paint_background" - ], - "paint_fill": { - "fill-antialias": { - "type": "boolean", - "default": true, - "doc": "Whether or not the fill should be antialiased.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-opacity": { - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.21.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-color": { - "type": "color", - "default": "#000000", - "doc": "The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.", - "transition": true, - "requires": [ - { - "!": "fill-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.19.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-outline-color": { - "type": "color", - "doc": "The outline color of the fill. Matches the value of `fill-color` if unspecified.", - "transition": true, - "requires": [ - { - "!": "fill-pattern" - }, - { - "fill-antialias": true - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.19.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The fill is translated relative to the map." - }, - "viewport": { - "doc": "The fill is translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `fill-translate`.", - "default": "map", - "requires": [ - "fill-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-pattern": { - "type": "string", - "transition": true, - "doc": "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 zoom-dependent expressions will be evaluated only at integer zoom levels.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.49.0", - "android": "6.5.0", - "macos": "0.11.0", - "ios": "4.4.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "cross-faded-data-driven" - } - }, - "paint_fill-extrusion": { - "fill-extrusion-opacity": { - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-extrusion-color": { - "type": "color", - "default": "#000000", - "doc": "The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.", - "transition": true, - "requires": [ - { - "!": "fill-extrusion-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-extrusion-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-extrusion-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The fill extrusion is translated relative to the map." - }, - "viewport": { - "doc": "The fill extrusion is translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `fill-extrusion-translate`.", - "default": "map", - "requires": [ - "fill-extrusion-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "fill-extrusion-pattern": { - "type": "string", - "transition": true, - "doc": "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 zoom-dependent expressions will be evaluated only at integer zoom levels.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": { - "js": "0.49.0", - "android": "6.5.0", - "macos": "0.11.0", - "ios": "4.4.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "cross-faded-data-driven" - }, - "fill-extrusion-height": { - "type": "number", - "default": 0, - "minimum": 0, - "units": "meters", - "doc": "The height with which to extrude this layer.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-extrusion-base": { - "type": "number", - "default": 0, - "minimum": 0, - "units": "meters", - "doc": "The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.", - "transition": true, - "requires": [ - "fill-extrusion-height" - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - }, - "data-driven styling": { - "js": "0.27.0", - "android": "5.1.0", - "ios": "3.6.0", - "macos": "0.5.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "fill-extrusion-vertical-gradient": { - "type": "boolean", - "default": true, - "doc": "Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.", - "transition": false, - "sdk-support": { - "basic functionality": { - "js": "0.50.0", - "ios" : "4.7.0", - "macos" : "0.13.0" - } - }, - "expression": { - "interpolated": false, - "parameters": ["zoom"] - }, - "property-type": "data-constant" - } - }, - "paint_line": { - "line-opacity": { - "type": "number", - "doc": "The opacity at which the line will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-color": { - "type": "color", - "doc": "The color with which the line will be drawn.", - "default": "#000000", - "transition": true, - "requires": [ - { - "!": "line-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.23.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "line-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The line is translated relative to the map." - }, - "viewport": { - "doc": "The line is translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `line-translate`.", - "default": "map", - "requires": [ - "line-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "line-width": { - "type": "number", - "default": 1, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Stroke thickness.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.39.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-gap-width": { - "type": "number", - "default": 0, - "minimum": 0, - "doc": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.", - "transition": true, - "units": "pixels", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-offset": { - "type": "number", - "default": 0, - "doc": "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.", - "transition": true, - "units": "pixels", - "sdk-support": { - "basic functionality": { - "js": "0.12.1", - "android": "3.0.0", - "ios": "3.1.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Blur applied to the line, in pixels.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "line-dasharray": { - "type": "array", - "value": "number", - "doc": "Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.", - "minimum": 0, - "transition": true, - "units": "line widths", - "requires": [ - { - "!": "line-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "cross-faded" - }, - "line-pattern": { - "type": "string", - "transition": true, - "doc": "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 zoom-dependent expressions will be evaluated only at integer zoom levels.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.49.0", - "android": "6.5.0", - "macos": "0.11.0", - "ios": "4.4.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom", - "feature" - ] - }, - "property-type": "cross-faded-data-driven" - }, - "line-gradient": { - "type": "color", - "doc": "Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\"lineMetrics\": true`.", - "transition": false, - "requires": [ - { - "!": "line-dasharray" - }, - { - "!": "line-pattern" - }, - { - "source": "geojson", - "has": { - "lineMetrics": true - } - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.45.0", - "android": "6.5.0", - "ios": "4.4.0", - "macos": "0.11.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "line-progress" - ] - }, - "property-type": "color-ramp" - } - }, - "paint_circle": { - "circle-radius": { - "type": "number", - "default": 5, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Circle radius.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.18.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-color": { - "type": "color", - "default": "#000000", - "doc": "The fill color of the circle.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.18.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-blur": { - "type": "number", - "default": 0, - "doc": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.20.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-opacity": { - "type": "number", - "doc": "The opacity at which the circle will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.20.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "circle-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The circle is translated relative to the map." - }, - "viewport": { - "doc": "The circle is translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `circle-translate`.", - "default": "map", - "requires": [ - "circle-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "circle-pitch-scale": { - "type": "enum", - "values": { - "map": { - "doc": "Circles are scaled according to their apparent distance to the camera." - }, - "viewport": { - "doc": "Circles are not scaled." - } - }, - "default": "map", - "doc": "Controls the scaling behavior of the circle when the map is pitched.", - "sdk-support": { - "basic functionality": { - "js": "0.21.0", - "android": "4.2.0", - "ios": "3.4.0", - "macos": "0.2.1" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "circle-pitch-alignment": { - "type": "enum", - "values": { - "map": { - "doc": "The circle is aligned to the plane of the map." - }, - "viewport": { - "doc": "The circle is aligned to the plane of the viewport." - } - }, - "default": "viewport", - "doc": "Orientation of circle when map is pitched.", - "sdk-support": { - "basic functionality": { - "js": "0.39.0", - "android": "5.2.0", - "ios": "3.7.0", - "macos": "0.6.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "circle-stroke-width": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.", - "sdk-support": { - "basic functionality": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-stroke-color": { - "type": "color", - "default": "#000000", - "doc": "The stroke color of the circle.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "circle-stroke-opacity": { - "type": "number", - "doc": "The opacity of the circle's stroke.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - }, - "data-driven styling": { - "js": "0.29.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - } - }, - "paint_heatmap": { - "heatmap-radius": { - "type": "number", - "default": 30, - "minimum": 1, - "transition": true, - "units": "pixels", - "doc": "Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "heatmap-weight": { - "type": "number", - "default": 1, - "minimum": 0, - "transition": false, - "doc": "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.", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "heatmap-intensity": { - "type": "number", - "default": 1, - "minimum": 0, - "transition": true, - "doc": "Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.", - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "heatmap-color": { - "type": "color", - "default": [ - "interpolate", - [ - "linear" - ], - [ - "heatmap-density" - ], - 0, - "rgba(0, 0, 255, 0)", - 0.1, - "royalblue", - 0.3, - "cyan", - 0.5, - "lime", - 0.7, - "yellow", - 1, - "red" - ], - "doc": "Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `[\"heatmap-density\"]` as input.", - "transition": false, - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "heatmap-density" - ] - }, - "property-type": "color-ramp" - }, - "heatmap-opacity": { - "type": "number", - "doc": "The global opacity at which the heatmap layer will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.41.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - } - }, - "paint_symbol": { - "icon-opacity": { - "doc": "The opacity at which the icon will be drawn.", - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "icon-color": { - "type": "color", - "default": "#000000", - "transition": true, - "doc": "The color of the icon. This can only be used with sdf icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "icon-halo-color": { - "type": "color", - "default": "rgba(0, 0, 0, 0)", - "transition": true, - "doc": "The color of the icon's halo. Icon halos can only be used with SDF icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "icon-halo-width": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Distance of halo to the icon outline.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "icon-halo-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Fade out the halo towards the outside.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "icon-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "icon-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "Icons are translated relative to the map." - }, - "viewport": { - "doc": "Icons are translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `icon-translate`.", - "default": "map", - "requires": [ - "icon-image", - "icon-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-opacity": { - "type": "number", - "doc": "The opacity at which the text will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "text-color": { - "type": "color", - "doc": "The color with which the text will be drawn.", - "default": "#000000", - "transition": true, - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "text-halo-color": { - "type": "color", - "default": "rgba(0, 0, 0, 0)", - "transition": true, - "doc": "The color of the text's halo, which helps it stand out from backgrounds.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "text-halo-width": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "text-halo-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "transition": true, - "units": "pixels", - "doc": "The halo's fadeout distance towards the outside.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": { - "js": "0.33.0", - "android": "5.0.0", - "ios": "3.5.0", - "macos": "0.4.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom", - "feature", - "feature-state" - ] - }, - "property-type": "data-driven" - }, - "text-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "transition": true, - "units": "pixels", - "doc": "Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "text-translate-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The text is translated relative to the map." - }, - "viewport": { - "doc": "The text is translated relative to the viewport." - } - }, - "doc": "Controls the frame of reference for `text-translate`.", - "default": "map", - "requires": [ - "text-field", - "text-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - } - }, - "paint_raster": { - "raster-opacity": { - "type": "number", - "doc": "The opacity at which the image will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-hue-rotate": { - "type": "number", - "default": 0, - "period": 360, - "transition": true, - "units": "degrees", - "doc": "Rotates hues around the color wheel.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-brightness-min": { - "type": "number", - "doc": "Increase or reduce the brightness of the image. The value is the minimum brightness.", - "default": 0, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-brightness-max": { - "type": "number", - "doc": "Increase or reduce the brightness of the image. The value is the maximum brightness.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-saturation": { - "type": "number", - "doc": "Increase or reduce the saturation of the image.", - "default": 0, - "minimum": -1, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-contrast": { - "type": "number", - "doc": "Increase or reduce the contrast of the image.", - "default": 0, - "minimum": -1, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-resampling": { - "type": "enum", - "doc": "The resampling/interpolation method to use for overscaling, also known as texture magnification filter", - "values": { - "linear": { - "doc": "(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" - }, - "nearest": { - "doc": "Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled" - } - }, - "default": "linear", - "sdk-support": { - "basic functionality": { - "js": "0.47.0", - "android": "6.3.0", - "ios": "4.2.0", - "macos": "0.9.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "raster-fade-duration": { - "type": "number", - "default": 300, - "minimum": 0, - "transition": false, - "units": "milliseconds", - "doc": "Fade duration when a new tile is added.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - } - }, - "paint_hillshade": { - "hillshade-illumination-direction": { - "type": "number", - "default": 335, - "minimum": 0, - "maximum": 359, - "doc": "The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.", - "transition": false, - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "hillshade-illumination-anchor": { - "type": "enum", - "values": { - "map": { - "doc": "The hillshade illumination is relative to the north direction." - }, - "viewport": { - "doc": "The hillshade illumination is relative to the top of the viewport." - } - }, - "default": "viewport", - "doc": "Direction of light source when map is rotated.", - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "hillshade-exaggeration": { - "type": "number", - "doc": "Intensity of the hillshade", - "default": 0.5, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "hillshade-shadow-color": { - "type": "color", - "default": "#000000", - "doc": "The shading color of areas that face away from the light source.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "hillshade-highlight-color": { - "type": "color", - "default": "#FFFFFF", - "doc": "The shading color of areas that faces towards the light source.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "hillshade-accent-color": { - "type": "color", - "default": "#000000", - "doc": "The shading color used to accentuate rugged terrain like sharp cliffs and gorges.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.43.0", - "android": "6.0.0", - "ios": "4.0.0", - "macos": "0.7.0" - }, - "data-driven styling": {} - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - } - }, - "paint_background": { - "background-color": { - "type": "color", - "default": "#000000", - "doc": "The color with which the background will be drawn.", - "transition": true, - "requires": [ - { - "!": "background-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - }, - "background-pattern": { - "type": "string", - "transition": true, - "doc": "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 zoom-dependent expressions will be evaluated only at integer zoom levels.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "expression": { - "interpolated": false, - "parameters": [ - "zoom" - ] - }, - "property-type": "cross-faded" - }, - "background-opacity": { - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "The opacity at which the background will be drawn.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "android": "2.0.1", - "ios": "2.0.0", - "macos": "0.1.0" - } - }, - "expression": { - "interpolated": true, - "parameters": [ - "zoom" - ] - }, - "property-type": "data-constant" - } - }, - "transition": { - "duration": { - "type": "number", - "default": 300, - "minimum": 0, - "units": "milliseconds", - "doc": "Time allotted for transitions to complete." - }, - "delay": { - "type": "number", - "default": 0, - "minimum": 0, - "units": "milliseconds", - "doc": "Length of time before a transition begins." - } - }, - "property-type": { - "data-driven": { - "type": "property-type", - "doc": "Property is interpolable and can be represented using a property expression." - }, - "cross-faded": { - "type": "property-type", - "doc": "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms." - }, - "cross-faded-data-driven": { - "type": "property-type", - "doc": "Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression." - }, - "color-ramp": { - "type": "property-type", - "doc": "Property should be specified using a color ramp from which the output color can be sampled based on a property calculation." - }, - "data-constant": { - "type": "property-type", - "doc": "Property is interpolable but cannot be represented using a property expression." - }, - "constant": { - "type": "property-type", - "doc": "Property is constant across all zoom levels and property values." - } - } -} \ No newline at end of file From 78b53802ba7bd4f94438456cd12fb3d2257e257c Mon Sep 17 00:00:00 2001 From: tobrun Date: Thu, 16 May 2019 16:17:15 +0200 Subject: [PATCH 3/4] [annotation] - cleanup old z-index, update to maps sdk v7.4.0 --- .../activity/annotation/SymbolActivity.java | 6 +-- plugin-annotation/scripts/annotation.java.ejs | 31 --------------- .../scripts/annotation_manager.java.ejs | 20 +--------- .../annotation_manager_unit_test.junit.ejs | 21 ---------- .../scripts/annotation_options.java.ejs | 39 ------------------- .../plugins/annotation/AnnotationManager.java | 6 --- .../plugins/annotation/CircleManager.java | 2 +- .../plugins/annotation/FillManager.java | 2 +- .../plugins/annotation/LineManager.java | 2 +- .../mapboxsdk/plugins/annotation/Symbol.java | 27 ------------- .../plugins/annotation/SymbolComparator.java | 12 ------ .../plugins/annotation/SymbolManager.java | 8 +--- .../plugins/annotation/SymbolOptions.java | 29 -------------- .../plugins/annotation/CircleManagerTest.java | 1 - .../plugins/annotation/FillManagerTest.java | 1 - .../plugins/annotation/LineManagerTest.java | 1 - .../plugins/annotation/SymbolManagerTest.java | 15 ------- 17 files changed, 8 insertions(+), 215 deletions(-) delete mode 100644 plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java diff --git a/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java b/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java index 631eb615b..4d6e44a57 100644 --- a/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java +++ b/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java @@ -98,7 +98,7 @@ protected void onCreate(Bundle savedInstanceState) { .withLatLng(new LatLng(6.687337, 0.381457)) .withIconImage(ID_ICON_AIRPORT) .withIconSize(1.3f) - .withZIndex(10) + .withSymbolSortKey(10.0f) .withDraggable(true); symbol = symbolManager.create(symbolOptions); Timber.e(symbol.toString()); @@ -109,7 +109,7 @@ protected void onCreate(Bundle savedInstanceState) { .withIconImage(MAKI_ICON_CIRCLE) .withIconColor(ColorUtils.colorToRgbaString(Color.YELLOW)) .withIconSize(2.5f) - .withZIndex(5) + .withSymbolSortKey(5.0f) .withDraggable(true); symbolManager.create(nearbyOptions); @@ -196,7 +196,7 @@ public boolean onOptionsItemSelected(MenuItem item) { } else if (item.getItemId() == R.id.menu_action_text_size) { symbol.setTextSize(22f); } else if (item.getItemId() == R.id.menu_action_z_index) { - symbol.setZIndex(0); + symbol.setSymbolSortKey(0.0f); } else if (item.getItemId() == R.id.menu_action_halo) { symbol.setIconHaloWidth(5.0f); symbol.setIconHaloColor(Color.RED); diff --git a/plugin-annotation/scripts/annotation.java.ejs b/plugin-annotation/scripts/annotation.java.ejs index 095068a41..5606638cd 100644 --- a/plugin-annotation/scripts/annotation.java.ejs +++ b/plugin-annotation/scripts/annotation.java.ejs @@ -54,11 +54,6 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>); } <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - if (!(jsonObject.get(<%- camelize(type) %>Options.PROPERTY_Z_INDEX) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(<%- camelize(type) %>Options.PROPERTY_Z_INDEX); - } <% } -%> } <% if (type === "circle" || type === "symbol") { -%> @@ -160,32 +155,6 @@ public class <%- camelize(type) %> extends Annotation<<%- geometryType(type) %>> return latLngs; } <% } -%> -<% if (type === "symbol") { -%> - - /** - * Set the z-index of a symbol. - *

- * If a symbol z-index is higher as another symbol it will be rendered above it. - *

- *

- * Default value is 0. - *

- * - * @param index the z-index value - */ - public void setZIndex(int index) { - jsonObject.addProperty(<%- camelize(type) %>Options.PROPERTY_Z_INDEX, index); - } - - /** - * Get the z-index of a symbol. - * - * @return the z-index value, 0 if not set - */ - public int getZIndex() { - return jsonObject.get(<%- camelize(type) %>Options.PROPERTY_Z_INDEX).getAsInt(); - } -<% } -%> // Property accessors <% for (const property of properties) { -%> diff --git a/plugin-annotation/scripts/annotation_manager.java.ejs b/plugin-annotation/scripts/annotation_manager.java.ejs index 64a241701..821eced3b 100644 --- a/plugin-annotation/scripts/annotation_manager.java.ejs +++ b/plugin-annotation/scripts/annotation_manager.java.ejs @@ -79,11 +79,7 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize @VisibleForTesting <%- camelize(type) %>Manager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style, @NonNull CoreElementProvider<<%- camelize(type) %>Layer> coreElementProvider, @Nullable String belowLayerId, @Nullable GeoJsonOptions geoJsonOptions, DraggableAnnotationController<<%- camelize(type) %>, On<%- camelize(type) %>DragListener> draggableAnnotationController) { -<% if (type === "symbol") { -%> - super(mapView, mapboxMap, style, coreElementProvider, new SymbolComparator(), draggableAnnotationController, belowLayerId, geoJsonOptions); -<% } else { -%> - super(mapView, mapboxMap, style, coreElementProvider, null, draggableAnnotationController, belowLayerId, geoJsonOptions); -<% } -%> + super(mapView, mapboxMap, style, coreElementProvider, draggableAnnotationController, belowLayerId, geoJsonOptions); } @Override @@ -92,9 +88,6 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize <% if (supportsPropertyFunction(property)) { -%> dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>, false); <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - dataDrivenPropertyUsageMap.put(<%- camelize(type) %>Options.PROPERTY_Z_INDEX, false); <% } -%> } @@ -107,11 +100,6 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize layer.setProperties(<%- camelizeWithLeadingLowercase(property.name) %>(get(<%- camelize(type) %>Options.PROPERTY_<%- snakeCaseUpper(property.name) %>))); break; <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - case <%- camelize(type) %>Options.PROPERTY_Z_INDEX: - layer.setProperties(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)); - break; <% } -%> } } @@ -130,9 +118,6 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize * Learn more about above properties in the Style specification. *

* Out of spec properties:
-<% if (type === "symbol") { -%> - * "z-index" - Integer, z-index of the feature within the manager
-<% } -%> * "is-draggable" - Boolean, true if the <%- type %> should be draggable, false otherwise * * @param json the GeoJSON defining the list of <%- type %>s to build @@ -157,9 +142,6 @@ public class <%- camelize(type) %>Manager extends AnnotationManager<<%- camelize * Learn more about above properties in the Style specification. *

* Out of spec properties:
-<% if (type === "symbol") { -%> - * "z-index" - Integer, z-index of the feature within the manager
-<% } -%> * "is-draggable" - Boolean, true if the <%- type %> should be draggable, false otherwise * * @param featureCollection the featureCollection defining the list of <%- type %>s to build diff --git a/plugin-annotation/scripts/annotation_manager_unit_test.junit.ejs b/plugin-annotation/scripts/annotation_manager_unit_test.junit.ejs index 638289bc4..5b7f6ee24 100644 --- a/plugin-annotation/scripts/annotation_manager_unit_test.junit.ejs +++ b/plugin-annotation/scripts/annotation_manager_unit_test.junit.ejs @@ -208,9 +208,6 @@ public class <%- camelize(type) %>ManagerTest { feature.add<%- propertyType(property) -%>Property("<%- property.name %>", <%- defaultValueJava(property) %>); <% } -%> <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - feature.addNumberProperty("z-index", 2); <% } -%> feature.addBooleanProperty("is-draggable", true); @@ -234,9 +231,6 @@ public class <%- camelize(type) %>ManagerTest { assertEquals(<%- type %>.get<%- camelize(property.name) %>(), <%- defaultValueJava(property) %>); <% } -%> <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - assertEquals(<%- type %>.getZIndex(), 2); <% } -%> assertTrue(<%- type %>.isDraggable()); } @@ -465,21 +459,6 @@ public class <%- camelize(type) %>ManagerTest { <% } -%> <% } -%> -<% if (type === "symbol") { -%> - @Test - public void testSymbolZOrderLayerProperty() { - <%- type %>Manager = new <%- camelize(type) %>Manager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); - verify(<%- type %>Layer, times(0)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - - <%- camelize(type) %>Options options = new <%- camelize(type) %>Options().withLatLng(new LatLng()); - <%- type %>Manager.create(options); - verify(<%- type %>Layer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - - <%- type %>Manager.create(options); - verify(<%- type %>Layer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - } -<% } -%> - @Test public void test<%- camelize(type) %>LayerFilter() { <%- type %>Manager = new <%- camelize(type) %>Manager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); diff --git a/plugin-annotation/scripts/annotation_options.java.ejs b/plugin-annotation/scripts/annotation_options.java.ejs index 704fd758e..0b25329d4 100644 --- a/plugin-annotation/scripts/annotation_options.java.ejs +++ b/plugin-annotation/scripts/annotation_options.java.ejs @@ -38,17 +38,11 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> private <%- propertyType(property) %> <%- camelizeWithLeadingLowercase(property.name) %>; <% } -%> <% } -%> -<% if (type === "symbol") { -%> - private int zIndex; -<% } -%> <% for (const property of properties) { -%> <% if (supportsPropertyFunction(property)) { -%> static final String PROPERTY_<%- snakeCaseUpper(property.name) %> = "<%- property.name %>"; <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - static final String PROPERTY_Z_INDEX = "z-index"; <% } -%> private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; <% for (const property of properties) { -%> @@ -234,31 +228,6 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> return geometry; } <% } -%> -<% if (type === "symbol") { -%> - - /** - * Set the zIndex of the symbol, which represents the place of the symbol on the map inside a layer. - *

- * A higher value brings the symbol to the front. - *

- * - * @param zIndex the z index - * @return this - */ - public SymbolOptions withZIndex(int zIndex) { - this.zIndex = zIndex; - return this; - } - - /** - * Get the zIndex of the symbol, which represents the place of the symbol on the map inside a layer. - * - * @return the z index - */ - public int getZIndex() { - return zIndex; - } -<% } -%> /** * Returns whether this <%- type %> is draggable, meaning it can be dragged across the screen when touched and moved. @@ -314,9 +283,6 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> jsonObject.addProperty(PROPERTY_<%- snakeCaseUpper(property.name) %>, <%- camelizeWithLeadingLowercase(property.name) %>); <% } -%> <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - jsonObject.addProperty(PROPERTY_Z_INDEX, zIndex); <% } -%> <%- camelize(type) %> <%- type %> = new <%- camelize(type) %>(id, annotationManager, jsonObject, geometry); <%- type %>.setDraggable(isDraggable); @@ -357,11 +323,6 @@ public class <%- camelize(type) %>Options extends Options<<%- camelize(type) %>> } <% } -%> <% } -%> -<% } -%> -<% if (type === "symbol") { -%> - if (feature.hasProperty(PROPERTY_Z_INDEX)) { - options.zIndex = feature.getProperty(PROPERTY_Z_INDEX).getAsInt(); - } <% } -%> if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/AnnotationManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/AnnotationManager.java index 2c54d6391..3e1c84ab6 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/AnnotationManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/AnnotationManager.java @@ -62,7 +62,6 @@ public abstract class AnnotationManager< protected L layer; private GeoJsonSource geoJsonSource; private final MapClickResolver mapClickResolver; - private final Comparator comparator; private Style style; private String belowLayerId; private CoreElementProvider coreElementProvider; @@ -70,11 +69,9 @@ public abstract class AnnotationManager< @UiThread protected AnnotationManager(MapView mapView, final MapboxMap mapboxMap, Style style, CoreElementProvider coreElementProvider, - Comparator comparator, DraggableAnnotationController draggableAnnotationController, String belowLayerId, final GeoJsonOptions geoJsonOptions) { this.mapboxMap = mapboxMap; - this.comparator = comparator; this.style = style; this.belowLayerId = belowLayerId; this.coreElementProvider = coreElementProvider; @@ -233,9 +230,6 @@ void internalUpdateSource() { t.setUsedDataDrivenProperties(); } - if (comparator != null) { - Collections.sort(features, comparator); - } geoJsonSource.setGeoJson(FeatureCollection.fromFeatures(features)); } diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java index f67627eef..ee6b6744d 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManager.java @@ -73,7 +73,7 @@ public CircleManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @No @VisibleForTesting CircleManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style, @NonNull CoreElementProvider coreElementProvider, @Nullable String belowLayerId, @Nullable GeoJsonOptions geoJsonOptions, DraggableAnnotationController draggableAnnotationController) { - super(mapView, mapboxMap, style, coreElementProvider, null, draggableAnnotationController, belowLayerId, geoJsonOptions); + super(mapView, mapboxMap, style, coreElementProvider, draggableAnnotationController, belowLayerId, geoJsonOptions); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java index c62687647..fdc53574e 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/FillManager.java @@ -72,7 +72,7 @@ public FillManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonN @VisibleForTesting FillManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style, @NonNull CoreElementProvider coreElementProvider, @Nullable String belowLayerId, @Nullable GeoJsonOptions geoJsonOptions, DraggableAnnotationController draggableAnnotationController) { - super(mapView, mapboxMap, style, coreElementProvider, null, draggableAnnotationController, belowLayerId, geoJsonOptions); + super(mapView, mapboxMap, style, coreElementProvider, draggableAnnotationController, belowLayerId, geoJsonOptions); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java index 56d58d02a..1a1933417 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/LineManager.java @@ -75,7 +75,7 @@ public LineManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonN @VisibleForTesting LineManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style, @NonNull CoreElementProvider coreElementProvider, @Nullable String belowLayerId, @Nullable GeoJsonOptions geoJsonOptions, DraggableAnnotationController draggableAnnotationController) { - super(mapView, mapboxMap, style, coreElementProvider, null, draggableAnnotationController, belowLayerId, geoJsonOptions); + super(mapView, mapboxMap, style, coreElementProvider, draggableAnnotationController, belowLayerId, geoJsonOptions); } @Override diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java index e942a7ca8..486d81e48 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/Symbol.java @@ -124,9 +124,6 @@ void setUsedDataDrivenProperties() { if (!(jsonObject.get(SymbolOptions.PROPERTY_TEXT_HALO_BLUR) instanceof JsonNull)) { annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_TEXT_HALO_BLUR); } - if (!(jsonObject.get(SymbolOptions.PROPERTY_Z_INDEX) instanceof JsonNull)) { - annotationManager.enableDataDrivenProperty(SymbolOptions.PROPERTY_Z_INDEX); - } } /** @@ -151,30 +148,6 @@ public LatLng getLatLng() { return new LatLng(geometry.latitude(), geometry.longitude()); } - /** - * Set the z-index of a symbol. - *

- * If a symbol z-index is higher as another symbol it will be rendered above it. - *

- *

- * Default value is 0. - *

- * - * @param index the z-index value - */ - public void setZIndex(int index) { - jsonObject.addProperty(SymbolOptions.PROPERTY_Z_INDEX, index); - } - - /** - * Get the z-index of a symbol. - * - * @return the z-index value, 0 if not set - */ - public int getZIndex() { - return jsonObject.get(SymbolOptions.PROPERTY_Z_INDEX).getAsInt(); - } - // Property accessors /** diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java deleted file mode 100644 index 1f09536a8..000000000 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolComparator.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.mapbox.mapboxsdk.plugins.annotation; - -import com.mapbox.geojson.Feature; - -import java.util.Comparator; - -public class SymbolComparator implements Comparator { - @Override - public int compare(Feature left, Feature right) { - return left.getProperty(SymbolOptions.PROPERTY_Z_INDEX).getAsInt() - right.getProperty(SymbolOptions.PROPERTY_Z_INDEX).getAsInt(); - } -} diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java index 18079fcf6..902bf8314 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManager.java @@ -95,7 +95,7 @@ public SymbolManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @No @VisibleForTesting SymbolManager(@NonNull MapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style, @NonNull CoreElementProvider coreElementProvider, @Nullable String belowLayerId, @Nullable GeoJsonOptions geoJsonOptions, DraggableAnnotationController draggableAnnotationController) { - super(mapView, mapboxMap, style, coreElementProvider, new SymbolComparator(), draggableAnnotationController, belowLayerId, geoJsonOptions); + super(mapView, mapboxMap, style, coreElementProvider, draggableAnnotationController, belowLayerId, geoJsonOptions); } @Override @@ -127,7 +127,6 @@ void initializeDataDrivenPropertyMap() { dataDrivenPropertyUsageMap.put(SymbolOptions.PROPERTY_TEXT_HALO_COLOR, false); dataDrivenPropertyUsageMap.put(SymbolOptions.PROPERTY_TEXT_HALO_WIDTH, false); dataDrivenPropertyUsageMap.put(SymbolOptions.PROPERTY_TEXT_HALO_BLUR, false); - dataDrivenPropertyUsageMap.put(SymbolOptions.PROPERTY_Z_INDEX, false); } @Override @@ -214,9 +213,6 @@ protected void setDataDrivenPropertyIsUsed(@NonNull String property) { case SymbolOptions.PROPERTY_TEXT_HALO_BLUR: layer.setProperties(textHaloBlur(get(SymbolOptions.PROPERTY_TEXT_HALO_BLUR))); break; - case SymbolOptions.PROPERTY_Z_INDEX: - layer.setProperties(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)); - break; } } @@ -256,7 +252,6 @@ protected void setDataDrivenPropertyIsUsed(@NonNull String property) { * Learn more about above properties in the Style specification. *

* Out of spec properties:
- * "z-index" - Integer, z-index of the feature within the manager
* "is-draggable" - Boolean, true if the symbol should be draggable, false otherwise * * @param json the GeoJSON defining the list of symbols to build @@ -303,7 +298,6 @@ public List create(@NonNull String json) { * Learn more about above properties in the Style specification. *

* Out of spec properties:
- * "z-index" - Integer, z-index of the feature within the manager
* "is-draggable" - Boolean, true if the symbol should be draggable, false otherwise * * @param featureCollection the featureCollection defining the list of symbols to build diff --git a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java index 2e995d03e..9e48a4cdd 100644 --- a/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java +++ b/plugin-annotation/src/main/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolOptions.java @@ -55,7 +55,6 @@ public class SymbolOptions extends Options { private String textHaloColor; private Float textHaloWidth; private Float textHaloBlur; - private int zIndex; static final String PROPERTY_SYMBOL_SORT_KEY = "symbol-sort-key"; static final String PROPERTY_ICON_SIZE = "icon-size"; @@ -84,7 +83,6 @@ public class SymbolOptions extends Options { static final String PROPERTY_TEXT_HALO_COLOR = "text-halo-color"; static final String PROPERTY_TEXT_HALO_WIDTH = "text-halo-width"; static final String PROPERTY_TEXT_HALO_BLUR = "text-halo-blur"; - static final String PROPERTY_Z_INDEX = "z-index"; private static final String PROPERTY_IS_DRAGGABLE = "is-draggable"; /** @@ -778,29 +776,6 @@ public Point getGeometry() { return geometry; } - /** - * Set the zIndex of the symbol, which represents the place of the symbol on the map inside a layer. - *

- * A higher value brings the symbol to the front. - *

- * - * @param zIndex the z index - * @return this - */ - public SymbolOptions withZIndex(int zIndex) { - this.zIndex = zIndex; - return this; - } - - /** - * Get the zIndex of the symbol, which represents the place of the symbol on the map inside a layer. - * - * @return the z index - */ - public int getZIndex() { - return zIndex; - } - /** * Returns whether this symbol is draggable, meaning it can be dragged across the screen when touched and moved. * @@ -874,7 +849,6 @@ Symbol build(long id, AnnotationManager annotationManager jsonObject.addProperty(PROPERTY_TEXT_HALO_COLOR, textHaloColor); jsonObject.addProperty(PROPERTY_TEXT_HALO_WIDTH, textHaloWidth); jsonObject.addProperty(PROPERTY_TEXT_HALO_BLUR, textHaloBlur); - jsonObject.addProperty(PROPERTY_Z_INDEX, zIndex); Symbol symbol = new Symbol(id, annotationManager, jsonObject, geometry); symbol.setDraggable(isDraggable); symbol.setData(data); @@ -978,9 +952,6 @@ static SymbolOptions fromFeature(@NonNull Feature feature) { if (feature.hasProperty(PROPERTY_TEXT_HALO_BLUR)) { options.textHaloBlur = feature.getProperty(PROPERTY_TEXT_HALO_BLUR).getAsFloat(); } - if (feature.hasProperty(PROPERTY_Z_INDEX)) { - options.zIndex = feature.getProperty(PROPERTY_Z_INDEX).getAsInt(); - } if (feature.hasProperty(PROPERTY_IS_DRAGGABLE)) { options.isDraggable = feature.getProperty(PROPERTY_IS_DRAGGABLE).getAsBoolean(); } diff --git a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManagerTest.java b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManagerTest.java index 68446a35e..c559e5338 100644 --- a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManagerTest.java +++ b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/CircleManagerTest.java @@ -332,7 +332,6 @@ public void testCircleStrokeOpacityLayerProperty() { verify(circleLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(circleStrokeOpacity(get("circle-stroke-opacity"))))); } - @Test public void testCircleLayerFilter() { circleManager = new CircleManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); diff --git a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/FillManagerTest.java b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/FillManagerTest.java index 2d5bda1f1..347b18983 100644 --- a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/FillManagerTest.java +++ b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/FillManagerTest.java @@ -381,7 +381,6 @@ public void testFillPatternLayerProperty() { verify(fillLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(fillPattern(get("fill-pattern"))))); } - @Test public void testFillLayerFilter() { fillManager = new FillManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); diff --git a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/LineManagerTest.java b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/LineManagerTest.java index 503fc5359..874c3c241 100644 --- a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/LineManagerTest.java +++ b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/LineManagerTest.java @@ -400,7 +400,6 @@ public void testLinePatternLayerProperty() { verify(lineLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(linePattern(get("line-pattern"))))); } - @Test public void testLineLayerFilter() { lineManager = new LineManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); diff --git a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java index 5a42f530e..354a35954 100644 --- a/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java +++ b/plugin-annotation/src/test/java/com/mapbox/mapboxsdk/plugins/annotation/SymbolManagerTest.java @@ -188,7 +188,6 @@ public void addSymbolFromFeatureCollection() { feature.addStringProperty("text-halo-color", "rgba(0, 0, 0, 1)"); feature.addNumberProperty("text-halo-width", 0.3f); feature.addNumberProperty("text-halo-blur", 0.3f); - feature.addNumberProperty("z-index", 2); feature.addBooleanProperty("is-draggable", true); List symbols = symbolManager.create(FeatureCollection.fromFeature(feature)); @@ -226,7 +225,6 @@ public void addSymbolFromFeatureCollection() { assertEquals(symbol.getTextHaloColor(), "rgba(0, 0, 0, 1)"); assertEquals(symbol.getTextHaloWidth(), 0.3f); assertEquals(symbol.getTextHaloBlur(), 0.3f); - assertEquals(symbol.getZIndex(), 2); assertTrue(symbol.isDraggable()); } @@ -638,19 +636,6 @@ public void testTextHaloBlurLayerProperty() { verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(textHaloBlur(get("text-halo-blur"))))); } - @Test - public void testSymbolZOrderLayerProperty() { - symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); - verify(symbolLayer, times(0)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - - SymbolOptions options = new SymbolOptions().withLatLng(new LatLng()); - symbolManager.create(options); - verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - - symbolManager.create(options); - verify(symbolLayer, times(1)).setProperties(argThat(new PropertyValueMatcher(symbolZOrder(Property.SYMBOL_Z_ORDER_SOURCE)))); - } - @Test public void testSymbolLayerFilter() { symbolManager = new SymbolManager(mapView, mapboxMap, style, coreElementProvider, null, null, draggableAnnotationController); From f9ab5a98dad1c034775745ad60d39da99055af00 Mon Sep 17 00:00:00 2001 From: tobrun Date: Fri, 24 May 2019 07:57:32 +0200 Subject: [PATCH 4/4] [plugins] - init submodules as part of ci build --- circle.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/circle.yml b/circle.yml index 327a5f047..d84849ce0 100644 --- a/circle.yml +++ b/circle.yml @@ -22,6 +22,9 @@ jobs: - run: name: Download Dependencies command: ./gradlew androidDependencies + - run: + name: Init submodules + command: git submodule update --init --recursive - save_cache: paths: - ~/.gradle @@ -85,6 +88,9 @@ jobs: IS_LOCAL_DEVELOPMENT: false steps: - checkout + - run: + name: Init submodules + command: git submodule update --init --recursive - run: name: Generate Maven credentials shell: /bin/bash -euo pipefail