You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Default Markers to iOS and Android Maps SDKs (#3597)
JIRA epic [here](https://mapbox.atlassian.net/browse/MAPSSDK-813).
This PR adds default markers to our iOS and Android Maps SDKs. These
Markers are convenience implementations of View Annotations with a
limited set of customization options (color, stoke, inner color, text).
Markers are only available in Swift UI and JetPack Compose.
---------
Co-authored-by: Release SDK bot for Maps SDK team <maps_sdk_ios@mapbox.com>
Co-authored-by: Kirill Kediarov <kirill.kediarov@mapbox.com>
GitOrigin-RevId: c6793cba5540e00cf049861962fa9deab1781630
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ Mapbox welcomes participation and contributions from everyone.
21
21
* Added `setContentDescription()` method to `AttributionPlugin` and `AttributionView` interfaces to programmatically set accessibility content description for the attribution button.
22
22
* Added `MapView.onResume()` which should be called in `onResume()` of the host activity or fragment to resume the map view if `plugin-lifecycle` is not used.
23
23
* Improved zoom animation performance by preloading target tiles and reducing unnecessary intermediate tile processing, resulting in smoother camera transitions and reduced frame rate drops.
24
+
* Introduce experimental `Marker` convenience API in Jetpack Compose. Use `Marker` to quickly add a `ViewAnnotation` pin at the specified coordinates with custom text, color, and stroke.
24
25
25
26
## Bug fixes 🐞
26
27
* Fix exception when accessing enum properties in annotations.
Copy file name to clipboardExpand all lines: compose-app/src/main/res/values/example_descriptions.xml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
<resources>
3
3
<stringname="description_simple_map">Create and display a map that uses the default Mapbox streets style. This example also shows how to update the starting camera for a map.</string>
4
4
<stringname="description_debug_mode">Use variations of debug modes of the Map</string>
5
+
<stringname="description_markers">Add Markers on the Map</string>
5
6
<stringname="description_circle_annotation">Add CircleAnnotation on the Map</string>
6
7
<stringname="description_point_annotation">Add PointAnnotation on the Map</string>
7
8
<stringname="description_point_annotation_cluster">Add PointAnnotation cluster on the Map</string>
method @androidx.compose.runtime.Composable public static com.mapbox.maps.extension.compose.annotation.IconImage rememberIconImage(@DrawableRes int resourceId);
173
173
}
174
174
175
+
public final class MarkerKt {
176
+
method @androidx.compose.runtime.Composable @com.mapbox.maps.MapboxExperimental @com.mapbox.maps.extension.compose.MapboxMapComposable public static void Marker(com.mapbox.geojson.Point point, long color = Color(4291812087), long innerColor = Color(4294967295), androidx.compose.ui.graphics.Color? stroke = Color(4282014202), String? text = null);
Copy file name to clipboardExpand all lines: extension-compose/api/extension-compose.api
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,10 @@ public final class com/mapbox/maps/extension/compose/annotation/IconImageKt {
196
196
public static final fun rememberIconImage (Ljava/lang/Object;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/runtime/Composer;I)Lcom/mapbox/maps/extension/compose/annotation/IconImage;
197
197
}
198
198
199
+
public final class com/mapbox/maps/extension/compose/annotation/MarkerKt {
200
+
public static final fun Marker-YiRMAXg (Lcom/mapbox/geojson/Point;JJLandroidx/compose/ui/graphics/Color;Ljava/lang/String;Landroidx/compose/runtime/Composer;II)V
201
+
}
202
+
199
203
public final class com/mapbox/maps/extension/compose/annotation/ViewAnnotationKt {
200
204
public static final fun ViewAnnotation (Lcom/mapbox/maps/ViewAnnotationOptions;Landroidx/compose/ui/Modifier;Lcom/mapbox/maps/viewannotation/OnViewAnnotationUpdatedListener;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
0 commit comments