Skip to content

Commit f42f77f

Browse files
kediarovgithub-actions[bot]
authored andcommitted
Expose minZoom / maxZoom for annotation managers (#3747)
1. The `"minzoom"` and `"maxzoom"` are the original names in gl, we needed to support custom kotlin properties names. It has been moved it to the `property.key` from annotation code generation. We might consider migrating other generators when needed or change the name. 2. The `isNumberTypeLong` function checked from zoom to be the `Long` type. There is no need for that as this property supports floating numbers. The current `Long` types in generated code for `Source`are preserved to not to introduce breaking changes. However properties in `AnnotationManager` are `Double` 3. `layer.properties` are hardcoded to keep the changes small and not to affect other projects. Format for these properties is different as they are not in `layer.type` cc @mapbox/sdk-ci cc @mapbox/maps-android cc @mapbox/maps-ios GitOrigin-RevId: 67747155f1d901bad58ba52c2f8f206812000b24
1 parent 80212e4 commit f42f77f

File tree

11 files changed

+353
-0
lines changed

11 files changed

+353
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone.
66

77
# 11.13.0-rc.1
88
## Features ✨ and improvements 🏁
9+
* Introduce `minZoom` and `maxZoom` properties for `CircleAnnotationManager`, `PointAnnotationManager`, `PolygonAnnotationManager`, `PolylineAnnotationManager`.
910
* [compose] Add config option `showLandmarkIcons` to `MapboxStandardStyle`.
1011

1112

app/src/androidTest/java/com/mapbox/maps/testapp/annotation/generated/CircleAnnotationManagerAndroidTest.kt

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/androidTest/java/com/mapbox/maps/testapp/annotation/generated/PointAnnotationManagerAndroidTest.kt

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/androidTest/java/com/mapbox/maps/testapp/annotation/generated/PolygonAnnotationManagerAndroidTest.kt

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/androidTest/java/com/mapbox/maps/testapp/annotation/generated/PolylineAnnotationManagerAndroidTest.kt

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin-annotation/api/Release/metalava.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ package com.mapbox.maps.plugin.annotation.generated {
155155
method public java.util.List<com.mapbox.maps.plugin.annotation.OnClusterClickListener> getClusterClickListeners();
156156
method public java.util.List<com.mapbox.maps.plugin.annotation.OnClusterLongClickListener> getClusterLongClickListeners();
157157
method public com.mapbox.maps.extension.style.expressions.generated.Expression? getLayerFilter();
158+
method public Double? getMaxZoom();
159+
method public Double? getMinZoom();
158160
method public String? getSlot();
159161
method public void setCircleBlur(Double?);
160162
method public void setCircleColorInt(@ColorInt Integer?);
@@ -176,6 +178,8 @@ package com.mapbox.maps.plugin.annotation.generated {
176178
method public void setCircleTranslateAnchor(com.mapbox.maps.extension.style.layers.properties.generated.CircleTranslateAnchor?);
177179
method protected void setDataDrivenPropertyIsUsed(String property);
178180
method public void setLayerFilter(com.mapbox.maps.extension.style.expressions.generated.Expression?);
181+
method public void setMaxZoom(Double?);
182+
method public void setMinZoom(Double?);
179183
method public void setSlot(String?);
180184
property public final Double? circleBlur;
181185
property @ColorInt public final Integer? circleColorInt;
@@ -198,6 +202,8 @@ package com.mapbox.maps.plugin.annotation.generated {
198202
property public java.util.List<com.mapbox.maps.plugin.annotation.OnClusterClickListener> clusterClickListeners;
199203
property public java.util.List<com.mapbox.maps.plugin.annotation.OnClusterLongClickListener> clusterLongClickListeners;
200204
property public com.mapbox.maps.extension.style.expressions.generated.Expression? layerFilter;
205+
property public final Double? maxZoom;
206+
property public final Double? minZoom;
201207
property public final String? slot;
202208
field public static final com.mapbox.maps.plugin.annotation.generated.CircleAnnotationManager.Companion Companion;
203209
}
@@ -517,6 +523,8 @@ package com.mapbox.maps.plugin.annotation.generated {
517523
method public java.util.List<java.lang.Double>? getIconTranslate();
518524
method public com.mapbox.maps.extension.style.layers.properties.generated.IconTranslateAnchor? getIconTranslateAnchor();
519525
method public com.mapbox.maps.extension.style.expressions.generated.Expression? getLayerFilter();
526+
method public Double? getMaxZoom();
527+
method public Double? getMinZoom();
520528
method public String? getSlot();
521529
method public Boolean? getSymbolAvoidEdges();
522530
method public com.mapbox.maps.extension.style.layers.properties.generated.SymbolElevationReference? getSymbolElevationReference();
@@ -595,6 +603,8 @@ package com.mapbox.maps.plugin.annotation.generated {
595603
method public void setIconTranslate(java.util.List<java.lang.Double>?);
596604
method public void setIconTranslateAnchor(com.mapbox.maps.extension.style.layers.properties.generated.IconTranslateAnchor?);
597605
method public void setLayerFilter(com.mapbox.maps.extension.style.expressions.generated.Expression?);
606+
method public void setMaxZoom(Double?);
607+
method public void setMinZoom(Double?);
598608
method public void setSlot(String?);
599609
method public void setSymbolAvoidEdges(Boolean?);
600610
method public void setSymbolElevationReference(com.mapbox.maps.extension.style.layers.properties.generated.SymbolElevationReference?);
@@ -674,6 +684,8 @@ package com.mapbox.maps.plugin.annotation.generated {
674684
property public final java.util.List<java.lang.Double>? iconTranslate;
675685
property public final com.mapbox.maps.extension.style.layers.properties.generated.IconTranslateAnchor? iconTranslateAnchor;
676686
property public com.mapbox.maps.extension.style.expressions.generated.Expression? layerFilter;
687+
property public final Double? maxZoom;
688+
property public final Double? minZoom;
677689
property public final String? slot;
678690
property public final Boolean? symbolAvoidEdges;
679691
property public final com.mapbox.maps.extension.style.layers.properties.generated.SymbolElevationReference? symbolElevationReference;
@@ -1044,6 +1056,8 @@ package com.mapbox.maps.plugin.annotation.generated {
10441056
method public String? getFillTunnelStructureColorUseTheme();
10451057
method public Double? getFillZOffset();
10461058
method public com.mapbox.maps.extension.style.expressions.generated.Expression? getLayerFilter();
1059+
method public Double? getMaxZoom();
1060+
method public Double? getMinZoom();
10471061
method public String? getSlot();
10481062
method protected void setDataDrivenPropertyIsUsed(String property);
10491063
method public void setFillAntialias(Boolean?);
@@ -1069,6 +1083,8 @@ package com.mapbox.maps.plugin.annotation.generated {
10691083
method public void setFillTunnelStructureColorUseTheme(String?);
10701084
method public void setFillZOffset(Double?);
10711085
method public void setLayerFilter(com.mapbox.maps.extension.style.expressions.generated.Expression?);
1086+
method public void setMaxZoom(Double?);
1087+
method public void setMinZoom(Double?);
10721088
method public void setSlot(String?);
10731089
property public final Boolean? fillAntialias;
10741090
property @ColorInt public final Integer? fillBridgeGuardRailColorInt;
@@ -1093,6 +1109,8 @@ package com.mapbox.maps.plugin.annotation.generated {
10931109
property public final String? fillTunnelStructureColorUseTheme;
10941110
property public final Double? fillZOffset;
10951111
property public com.mapbox.maps.extension.style.expressions.generated.Expression? layerFilter;
1112+
property public final Double? maxZoom;
1113+
property public final Double? minZoom;
10961114
property public final String? slot;
10971115
field public static final com.mapbox.maps.plugin.annotation.generated.PolygonAnnotationManager.Companion Companion;
10981116
}
@@ -1298,6 +1316,8 @@ package com.mapbox.maps.plugin.annotation.generated {
12981316
method public Double? getLineWidth();
12991317
method public com.mapbox.maps.extension.style.layers.properties.generated.LineWidthUnit? getLineWidthUnit();
13001318
method public Double? getLineZOffset();
1319+
method public Double? getMaxZoom();
1320+
method public Double? getMinZoom();
13011321
method public String? getSlot();
13021322
method protected void setDataDrivenPropertyIsUsed(String property);
13031323
method public void setLayerFilter(com.mapbox.maps.extension.style.expressions.generated.Expression?);
@@ -1336,6 +1356,8 @@ package com.mapbox.maps.plugin.annotation.generated {
13361356
method public void setLineWidth(Double?);
13371357
method public void setLineWidthUnit(com.mapbox.maps.extension.style.layers.properties.generated.LineWidthUnit?);
13381358
method public void setLineZOffset(Double?);
1359+
method public void setMaxZoom(Double?);
1360+
method public void setMinZoom(Double?);
13391361
method public void setSlot(String?);
13401362
property public com.mapbox.maps.extension.style.expressions.generated.Expression? layerFilter;
13411363
property public final Double? lineBlur;
@@ -1373,6 +1395,8 @@ package com.mapbox.maps.plugin.annotation.generated {
13731395
property public final Double? lineWidth;
13741396
property public final com.mapbox.maps.extension.style.layers.properties.generated.LineWidthUnit? lineWidthUnit;
13751397
property public final Double? lineZOffset;
1398+
property public final Double? maxZoom;
1399+
property public final Double? minZoom;
13761400
property public final String? slot;
13771401
field public static final com.mapbox.maps.plugin.annotation.generated.PolylineAnnotationManager.Companion Companion;
13781402
}

plugin-annotation/api/plugin-annotation.api

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/CircleAnnotationM
140140
public fun getClusterClickListeners ()Ljava/util/List;
141141
public fun getClusterLongClickListeners ()Ljava/util/List;
142142
public fun getLayerFilter ()Lcom/mapbox/maps/extension/style/expressions/generated/Expression;
143+
public final fun getMaxZoom ()Ljava/lang/Double;
144+
public final fun getMinZoom ()Ljava/lang/Double;
143145
public final fun getSlot ()Ljava/lang/String;
144146
public fun removeClusterClickListener (Lcom/mapbox/maps/plugin/annotation/OnClusterClickListener;)Z
145147
public fun removeClusterLongClickListener (Lcom/mapbox/maps/plugin/annotation/OnClusterLongClickListener;)Z
@@ -162,6 +164,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/CircleAnnotationM
162164
public final fun setCircleTranslate (Ljava/util/List;)V
163165
public final fun setCircleTranslateAnchor (Lcom/mapbox/maps/extension/style/layers/properties/generated/CircleTranslateAnchor;)V
164166
public fun setLayerFilter (Lcom/mapbox/maps/extension/style/expressions/generated/Expression;)V
167+
public final fun setMaxZoom (Ljava/lang/Double;)V
168+
public final fun setMinZoom (Ljava/lang/Double;)V
165169
public final fun setSlot (Ljava/lang/String;)V
166170
}
167171

@@ -431,6 +435,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PointAnnotationMa
431435
public final fun getIconTranslate ()Ljava/util/List;
432436
public final fun getIconTranslateAnchor ()Lcom/mapbox/maps/extension/style/layers/properties/generated/IconTranslateAnchor;
433437
public fun getLayerFilter ()Lcom/mapbox/maps/extension/style/expressions/generated/Expression;
438+
public final fun getMaxZoom ()Ljava/lang/Double;
439+
public final fun getMinZoom ()Ljava/lang/Double;
434440
public final fun getSlot ()Ljava/lang/String;
435441
public final fun getSymbolAvoidEdges ()Ljava/lang/Boolean;
436442
public final fun getSymbolElevationReference ()Lcom/mapbox/maps/extension/style/layers/properties/generated/SymbolElevationReference;
@@ -510,6 +516,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PointAnnotationMa
510516
public final fun setIconTranslate (Ljava/util/List;)V
511517
public final fun setIconTranslateAnchor (Lcom/mapbox/maps/extension/style/layers/properties/generated/IconTranslateAnchor;)V
512518
public fun setLayerFilter (Lcom/mapbox/maps/extension/style/expressions/generated/Expression;)V
519+
public final fun setMaxZoom (Ljava/lang/Double;)V
520+
public final fun setMinZoom (Ljava/lang/Double;)V
513521
public final fun setSlot (Ljava/lang/String;)V
514522
public final fun setSymbolAvoidEdges (Ljava/lang/Boolean;)V
515523
public final fun setSymbolElevationReference (Lcom/mapbox/maps/extension/style/layers/properties/generated/SymbolElevationReference;)V
@@ -826,6 +834,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PolygonAnnotation
826834
public final fun getFillTunnelStructureColorUseTheme ()Ljava/lang/String;
827835
public final fun getFillZOffset ()Ljava/lang/Double;
828836
public fun getLayerFilter ()Lcom/mapbox/maps/extension/style/expressions/generated/Expression;
837+
public final fun getMaxZoom ()Ljava/lang/Double;
838+
public final fun getMinZoom ()Ljava/lang/Double;
829839
public final fun getSlot ()Ljava/lang/String;
830840
public final fun setFillAntialias (Ljava/lang/Boolean;)V
831841
public final fun setFillBridgeGuardRailColorInt (Ljava/lang/Integer;)V
@@ -850,6 +860,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PolygonAnnotation
850860
public final fun setFillTunnelStructureColorUseTheme (Ljava/lang/String;)V
851861
public final fun setFillZOffset (Ljava/lang/Double;)V
852862
public fun setLayerFilter (Lcom/mapbox/maps/extension/style/expressions/generated/Expression;)V
863+
public final fun setMaxZoom (Ljava/lang/Double;)V
864+
public final fun setMinZoom (Ljava/lang/Double;)V
853865
public final fun setSlot (Ljava/lang/String;)V
854866
}
855867

@@ -1028,6 +1040,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PolylineAnnotatio
10281040
public final fun getLineWidth ()Ljava/lang/Double;
10291041
public final fun getLineWidthUnit ()Lcom/mapbox/maps/extension/style/layers/properties/generated/LineWidthUnit;
10301042
public final fun getLineZOffset ()Ljava/lang/Double;
1043+
public final fun getMaxZoom ()Ljava/lang/Double;
1044+
public final fun getMinZoom ()Ljava/lang/Double;
10311045
public final fun getSlot ()Ljava/lang/String;
10321046
public fun setLayerFilter (Lcom/mapbox/maps/extension/style/expressions/generated/Expression;)V
10331047
public final fun setLineBlur (Ljava/lang/Double;)V
@@ -1065,6 +1079,8 @@ public final class com/mapbox/maps/plugin/annotation/generated/PolylineAnnotatio
10651079
public final fun setLineWidth (Ljava/lang/Double;)V
10661080
public final fun setLineWidthUnit (Lcom/mapbox/maps/extension/style/layers/properties/generated/LineWidthUnit;)V
10671081
public final fun setLineZOffset (Ljava/lang/Double;)V
1082+
public final fun setMaxZoom (Ljava/lang/Double;)V
1083+
public final fun setMinZoom (Ljava/lang/Double;)V
10681084
public final fun setSlot (Ljava/lang/String;)V
10691085
}
10701086

plugin-annotation/src/main/java/com/mapbox/maps/plugin/annotation/generated/CircleAnnotationManager.kt

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)