Skip to content

map(google): slim maps-utils 5.0 data-layer workarounds once upstream fixes land #6306

Description

@jamesarich

#6304 migrated the google-flavor custom map overlays (KML/KMZ/GeoJSON "Map Layers") onto the new android-maps-utils 5.0 platform-agnostic data layer. During that migration we found three upstream bugs and worked around all of them app-side. This issue tracks the upstream fixes and the cleanup we should do here when they land.

Upstream tracking

Upstream bug Fix PR What it forces in our code today
googlemaps/android-maps-utils#1722MapViewRenderer.removeFeature() no-op for MultiGeometry (objects stranded on map, duplicated on re-add) googlemaps/android-maps-utils#1725 RenderedMapLayer creates a single-use renderer per show and tears down with clear() only — never removeFeature/removeLayer
googlemaps/android-maps-utils#1724GeoJsonMapper styles MultiPolygon as a line, dropping simplestyle fill googlemaps/android-maps-utils#1727 applySimpleStyleSpec in MapView.kt rebuilds all polygon/line styles from properties, including its own polygon-vs-line geometry detection
googlemaps/android-maps-utils#1723 — point markers invisible (alpha 0) through the deprecated GeoJsonLayer/KmlLayer bridges googlemaps/android-maps-utils#1726 Nothing — we migrated off the bridges; tracked for awareness only

When a fixed release ships

The fixes arrive transitively: android-maps-utils → maps-utils-ktx → maps-compose (Renovate will surface the bump).

  • Re-evaluate RenderedMapLayer's single-use-renderer pattern ([Bug]: Can't access Range Test to turn it off when connected with TCP #1722 fixed): removeLayer() becomes trustworthy. Note clear() still permanently cancels the renderer's icon-loading scope, so renderer-per-show may remain the right call for re-shows — decide with fresh eyes.
  • Shrink applySimpleStyleSpec (chore(deps): update androidx.datastore:datastore to v1.1.4 #1724 fixed): drop our polygon-vs-line MultiGeometry detection and lean on the upstream mapper's styles. Keep the app-specific extras upstream doesn't cover: legacy color fallback, rgb()/rgba() parsing, and the DEFAULT_GEOJSON_FILL_OPACITY (0.35) default that makes stacked Site Planner contour bands read as a gradient.
  • Re-run the overlay device pass when bumping: Site Planner coverage GeoJSON (per-band colors + opacity), KMZ with icon images, visibility toggle + refresh for each layer type.

Code region: androidApp/src/google/kotlin/org/meshtastic/app/map/MapView.kt ("Map Layers"). Context and root-cause analysis: #6304.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions