Skip to content

Demo app improvements following #853 MapLibre Compose UI migration#871

Open
klemensz wants to merge 19 commits intostadiamaps:mainfrom
klemensz:maplibre-compose-migration-754-demo-app
Open

Demo app improvements following #853 MapLibre Compose UI migration#871
klemensz wants to merge 19 commits intostadiamaps:mainfrom
klemensz:maplibre-compose-migration-754-demo-app

Conversation

@klemensz
Copy link
Copy Markdown

@klemensz klemensz commented Apr 3, 2026

Summary

This follow-up improves the Android demo app UX on top of the ongoing maplibre-compose migration in #853.

Instead of starting navigation immediately from a long press or search result, the demo now uses an explicit destination-selection flow with a preview bottom sheet, camera preview, and a browse-mode recenter button.

Why

This brings the demo app closer to a real navigation app and exercises more of the maplibre-compose integration in realistic user flows. It is split into a separate PR so the original migration PR does not grow even larger.

Changes

  • add destination selection state to the demo scene / view model
  • show a bottom sheet before starting navigation
  • preview the selected destination with camera updates and adjusted bottom padding
  • add a recenter button while not navigating
  • keep the dropped-pin overlay, now backed by typed FeatureCollection data instead of raw JSON strings
  • include a small MapControls padding fix for top system insets

Notes

This is primarily demo-app UX work. The only ui-maplibre change is the small MapControls inset adjustment.

Screenshots

image image

klemensz added 19 commits March 25, 2026 15:32
Migrates the Android phone and tablet navigation views from the legacy dependency to the official `org.maplibre.compose:maplibre-compose-android` artifact.

Key changes include:
* Introduced `NavigationMapState` to manage camera modes (follow user, overview, free) and zoom behavior.
* Replaced `MapViewCamera` with a custom camera layer supporting automatic orientation and recentering logic.
* Updated route rendering to use GeoJSON sources and `LineLayer` instead of legacy polyline APIs.
* Added `NavigationMapPuckStyle` for configurable location puck appearance.
* Refactored `NavigationMapView` to support official `MapOptions`, `LocationPuck`, and native `Style` access.
* Updated gesture handling to use Ferrostar-specific `NavigationMapClickHandler` returning geographic coordinates.
* Maintained legacy compatibility for Android Auto in `ui-maplibre-car-app` by keeping the Rallista dependency for that module.
* Added unit tests for GeoJSON serialization, location mapping, and camera state logic.
…ate logic to differentiate between "template" and "tracking" camera positions.
…d introduce a specialized navigation puck overlay.
…igationMapView`

The `NavigationMapView` component in the Android MapLibre UI module now exposes `onMapLoadFinished` and `onMapLoadFailed` callbacks instead of the legacy `onMapReadyCallback`. This change removes the internal reflection-based workaround (`nativeStyleOrNull`) previously used to extract the native MapLibre `Style` from the compose `CameraState`.
…ibre UI

Introduces a route-snapping mechanism for the navigation puck and camera using a new `rememberDisplayedNavigationLocation` hook. This ensures the displayed position and bearing stay locked to the route geometry during navigation, reducing jitter from noisy GPS data.
…o app based on maplibre-compose, featuring a bottom sheet for location details and improved camera handling.
@klemensz klemensz changed the title Demo app improvements - follow up to MapLibre Compose UI migration Demo app improvements following #853 MapLibre Compose UI migration Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant