Skip to content

Commit 5bdca7f

Browse files
authored
Update examples for view annotation min/maxZoom (#2910)
* Add minzoom configuration for view annotations * Update mapbox-sdk pin * Add changelog entry * Update license
1 parent 0f8c06b commit 5bdca7f

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
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
## Features ✨ and improvements 🏁
77
* Localize geofencing attribution dialog.
88
* Introduce `ViewAnnotationOptions.priority`, deprecate `ViewAnnotationOptions.selected`. Use this property to define view annotation sort order.
9+
* Introduce `ViewAnnotationOptions.minZoom` and `ViewAnnotationOptions.maxZoom`. Use these properties to configure zoom-level specific view annotations.
910
* Introduce `SymbolLayer.iconSizeScaleRange`, `SymbolLayer.textSizeScaleRange`, `FillLayer.fillElevationReference`, `LineLayer.lineCrossSlope`, `LineLayer.lineWidthUnit`, `LineLayer.lineCrossSlope`, `LineLayer.lineElevationReference`, `DirectionalLight.shadowQuality`, `Rain.distortionStrength`, `Rain.distortionStrengthTransition`, `Rain.dropletSize`, `Rain.dropletSizeTransition`, `Rain.vignetteColor`, `Rain.vignetteColorTransition`, `Snow.flakeSize`, `Snow.flakeSizeTransition`, `Snow.vignetteColor`, `Snow.vignetteColorTransition`.
1011
* Change default value of experimental `Rain.opacity` to 0.19, default `Rain.vignette` to 0.3, `Snow.opacity` to 0.19, default `Snow.vignette` to 0.3.
1112
* [compose] Introduce experimental `SymbolLayerState.iconSizeScaleRange`, `SymbolLayerState.textSizeScaleRange`, `FillLayerState.fillElevationReference`, `LineLayerState.lineCrossSlope`, `LineLayerState.lineWidthUnit`, `LineLayerState.lineCrossSlope`, `LineLayerState.lineElevationReference`, `DirectionalLightState.shadowQuality`, `RainState.distortionStrength`, `RainState.distortionStrengthTransition`, `RainState.dropletSize`, `RainState.dropletSizeTransition`, `RainState.vignetteColor`, `RainState.vignetteColorTransition`, `SnowState.flakeSize`, `SnowState.flakeSizeTransition`, `SnowState.vignetteColor`, `SnowState.vignetteColorTransition`.

LICENSE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Mapbox Maps for Android version 11.0
44
Mapbox Maps Android SDK
55

6-
Copyright © 2021 - 2024 Mapbox, Inc. All rights reserved.
6+
Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved.
77

88
The software and files in this repository (collectively, “Software”) are licensed under the Mapbox TOS for use only with the relevant Mapbox product(s) listed at www.mapbox.com/pricing. This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS. For the license terms, please see the Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox Product Terms at www.mapbox.com/legal/service-terms. If this Software is a SDK, modifications that change or interfere with marked portions of the code related to billing, accounting, or data collection are not authorized and the SDK sends limited de-identified location and usage data which is used in accordance with the Mapbox TOS. [Updated 2023-01]
99

@@ -482,13 +482,13 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens
482482

483483
===========================================================================
484484

485-
### MapboxCoreMaps,11.9.0,Mapbox ToS,Mapbox,https://www.mapbox.com/
485+
### MapboxCoreMaps,11.10.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/
486486

487487
```
488488
Mapbox Core Maps version 11.0
489489
Mapbox Core Maps SDK
490490
491-
Copyright (c) 2024 Mapbox
491+
Copyright (c) 2025 Mapbox
492492
493493
All rights reserved.
494494

app/src/main/java/com/mapbox/maps/testapp/examples/markersandcallouts/viewannotation/DynamicViewAnnotationActivity.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
350350
anchor(ViewAnnotationAnchor.BOTTOM_LEFT)
351351
},
352352
)
353+
minZoom(8f)
353354
}
354355
)
355356
alternativeEtaView = viewAnnotationManager.addViewAnnotation(
@@ -370,6 +371,7 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
370371
anchor(ViewAnnotationAnchor.BOTTOM_LEFT)
371372
},
372373
)
374+
minZoom(8f)
373375
}
374376
)
375377
alternativeEtaView.setOnClickListener {
@@ -384,6 +386,7 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
384386
annotatedLayerFeature(LAYER_PARKING) {
385387
featureId(PARKING_FEATURE_ID_1)
386388
}
389+
minZoom(10f)
387390
}
388391
)
389392

@@ -395,6 +398,7 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
395398
annotatedLayerFeature(LAYER_PARKING) {
396399
featureId(PARKING_FEATURE_ID_2)
397400
}
401+
minZoom(12f)
398402
}
399403
)
400404

@@ -407,6 +411,7 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
407411
annotatedLayerFeature(LAYER_CONSTRUCTION) {
408412
featureId(CONSTRUCTION_FEATURE_ID_1)
409413
}
414+
minZoom(10f)
410415
}
411416
)
412417
}
@@ -499,14 +504,10 @@ class DynamicViewAnnotationActivity : AppCompatActivity() {
499504
flipX = flipX,
500505
flipY = flipY,
501506
tint = tint,
502-
)!!
507+
)
503508
)
504509
}
505510

506-
override fun onDestroy() {
507-
super.onDestroy()
508-
}
509-
510511
private companion object {
511512
const val LAYER_MAIN_ID = "layer-main"
512513
const val LAYER_ALT_ID = "layer-alt"

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ japicmp = "0.4.1"
3535
# Dependencies
3636

3737
# GlNative and Common are used by the convention plugin
38-
mapboxGlNative = "11.10.0-SNAPSHOT-01-03--04-28.git-f26a6d7"
39-
mapboxCommon = "24.10.0-SNAPSHOT-01-03--04-28.git-f26a6d7"
38+
mapboxGlNative = "11.10.0-SNAPSHOT-01-13--04-28.git-f2431a9"
39+
mapboxCommon = "24.10.0-SNAPSHOT-01-13--04-28.git-f2431a9"
4040

4141
mapboxBase = "0.11.0"
4242
mapboxGestures = "0.8.0"

0 commit comments

Comments
 (0)