Demo app improvements following #853 MapLibre Compose UI migration#871
Open
klemensz wants to merge 19 commits intostadiamaps:mainfrom
Open
Demo app improvements following #853 MapLibre Compose UI migration#871klemensz wants to merge 19 commits intostadiamaps:mainfrom
klemensz wants to merge 19 commits intostadiamaps:mainfrom
Conversation
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.
…e` and refine demo UI
…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`.
… Android Auto UI
…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.
…-MapLibre (Compose)
…into maplibre-compose-migration-754
…o app based on maplibre-compose, featuring a bottom sheet for location details and improved camera handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This follow-up improves the Android demo app UX on top of the ongoing
maplibre-composemigration 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-composeintegration in realistic user flows. It is split into a separate PR so the original migration PR does not grow even larger.Changes
FeatureCollectiondata instead of raw JSON stringsMapControlspadding fix for top system insetsNotes
This is primarily demo-app UX work. The only
ui-maplibrechange is the smallMapControlsinset adjustment.Screenshots