Skip to content

Android: Enable synchronous updates for NavigationPuckOverlay GeoJSON source#931

Merged
ianthetechie merged 1 commit into
stadiamaps:mainfrom
klemensz:feat/android/synchronous-update-navigation-puck
Jun 30, 2026
Merged

Android: Enable synchronous updates for NavigationPuckOverlay GeoJSON source#931
ianthetechie merged 1 commit into
stadiamaps:mainfrom
klemensz:feat/android/synchronous-update-navigation-puck

Conversation

@klemensz

@klemensz klemensz commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable synchronous GeoJSON updates for the Android NavigationPuckOverlay source.

The navigation puck source contains a single point feature with the current position and bearing. This is a small, frequently updated, latency-sensitive source, so it is a good fit for MapLibre Compose's GeoJsonOptions(synchronousUpdate = true) (see maplibre/maplibre-compose#761 and maplibre/maplibre-native#3968).

Motivation

The navigation puck should visually track position and bearing updates with as little latency as possible during active navigation. Applying this update synchronously avoids the extra async source update delay for this very small in-memory GeoJSON source.

Notes

This is intentionally limited to the navigation puck source. Larger GeoJSON sources such as routes, shape collections, or clustered data should continue using the default asynchronous update path to avoid hurting frame performance.

Testing

  • Tested demo app with simulated location
    • I tested with both values (true and false) and also checked the profile - could't observe increased CPU usage

@ianthetechie
ianthetechie merged commit 9b91e0a into stadiamaps:main Jun 30, 2026
14 checks passed
@ianthetechie

Copy link
Copy Markdown
Contributor

Thanks!

@klemensz
klemensz deleted the feat/android/synchronous-update-navigation-puck branch July 13, 2026 09:54
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.

2 participants