Add feature state functionality to Android (#4219)

This commit is contained in:
Brandon Roeder
2026-07-13 13:53:52 -05:00
committed by GitHub
parent 764accc8f5
commit c58080b491
23 changed files with 797 additions and 7 deletions

View File

@@ -0,0 +1,43 @@
{
"version": 8,
"center": [0, 0],
"zoom": 3,
"sources": {
"style-source": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "feature-1",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [0, 0]
}
}
]
}
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "#ffffff"
}
},
{
"id": "selected-layer",
"type": "circle",
"source": "style-source",
"filter": ["==", ["feature-state", "selected"], true],
"paint": {
"circle-radius": 12,
"circle-color": "#ff0000"
}
}
]
}

View File

@@ -50,6 +50,7 @@
<string name="description_query_rendered_features_box_symbol_count">Count all rendered symbols in box</string>
<string name="description_query_rendered_features_box_highlight">Highlight buildings in box</string>
<string name="description_query_source_features">Query source for features</string>
<string name="description_feature_state">Toggle feature state and style features interactively</string>
<string name="description_simple_map">Shows a simple map</string>
<string name="description_map_change">Logs map change events to Logcat</string>
<string name="description_visibility_map">Changes visibility of map and view parent</string>

View File

@@ -49,6 +49,7 @@
<string name="activity_query_rendered_features_box_symbol_count">Count symbols in box</string>
<string name="activity_query_rendered_features_box_highlight">Highlight features in box</string>
<string name="activity_query_source_features">Query source features</string>
<string name="activity_feature_state">Feature state</string>
<string name="activity_symbol_layer">Symbols</string>
<string name="activity_add_sprite">Add Custom Sprite</string>
<string name="activity_simple_map">Simple Map</string>