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
[demo-app] Update appearances examples to showcase paint properties (#12560)
### Summary
- Update Android and iOS appearances examples to demonstrate paint
properties (translate, color, opacity)
- Remove experimental annotations and comments — appearances are now
stable
- Add text labels to hotel icons to showcase text paint property changes
### Context
Appearances in symbol layers now support both paint and layout
properties and are no longer experimental. The existing native examples
only demonstrated layout property changes (icon-image). This aligns them
with the [GL-JS reference
example](https://docs.mapbox.com/mapbox-gl-js/example/appearances/).
GeoJSON data and layer style JSON are aligned with the GL-JS debug
example (`projects/gl-js/debug/appearances.html`) — same hotel names,
text layout props, base paint values, and appearance paint properties.
The `hovered` appearance from GL-JS is omitted since hover doesn't apply
on touch devices.
### Key Changes
- **AppearancesActivity.kt**: Added text layout props, base paint
section, paint properties in appearances (icon-translate,
text-translate, text-color, text-halo, opacity). Added hotel names to
GeoJSON. Removed experimental mentions.
- **AppearancesExample.swift**: Same layer/GeoJSON updates. Removed
`@_spi(Experimental)` import — all APIs used are public.
- **example_descriptions.xml**: Updated description to mention paint
properties.
### Validation
- [x] Run Android compose-app Appearances example — verify text labels,
translate on select, opacity on previously-clicked
- [x] Run iOS example app Appearances example — verify same behavior
cc @mapbox/maps-ios
cc @mapbox/maps-android
GitOrigin-RevId: 927ccada4f3bf73398702bb8923a900a5a7f4d33
Copy file name to clipboardExpand all lines: compose-app/src/main/res/values/example_descriptions.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
<stringname="description_standard_style">Showcase usage of Standard style</string>
30
30
<stringname="description_clip_layer">Showcase the usage of clip layer.</string>
31
31
<stringname="description_interactions">Showcase the interactions.</string>
32
-
<stringname="description_appearances">Change icon images dynamically using the Appearances API with feature-state</string>
32
+
<stringname="description_appearances">Change icon images, text styles, and paint properties dynamically using the Appearances API with feature-state</string>
33
33
<stringname="description_custom_vector_icons">Dynamically style vector icons with custom colors and interactively change their size on tap</string>
34
34
<stringname="description_precipitations">Showcase the rain and snow effects.</string>
35
35
<stringname="description_color_theme">Showcase color theme.</string>
0 commit comments