Repository navigation
Fill headless API gaps and add RNNavigationView - #2
Merged
Merged
Conversation
mfazekas
force-pushed
the
feat/navigation-view
branch
from
October 20, 2026 22:18
c0ef1f8 to
0836ccd
Compare
mfazekas
force-pushed
the
feat/rn-navigation-view
branch
from
October 20, 2026 22:55
f70ea27 to
172005e
Compare
mfazekas
marked this pull request as ready for review
October 20, 2026 23:04
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.
Stacked on #1. Fills the gaps in the headless API and adds
<RNNavigationView>, a navigation UI written in React Native on top of it, to check that the low-level API is enough to rebuild<NavigationView>.API additions, same shapes on both platforms:
secondaryInstruction,subInstruction,lanes(indications,valid,activeDirection),legIndex,stepIndex.Routelegs getsteps(instruction, distance, duration, maneuver type/modifier, road name).<NavigationView>'sonRouteProgresshas the same fields.addLocationListener(snapped location, speed, course, road name, speed limit with unit and sign standard),addArriveListener,addOffRouteListener, andaddRouteChangeListener, which hands JS a newRoutehost object on reroute or a switch to an alternative; the old one stays valid until released.<NavigationView>;setVoiceMuted/isVoiceMuted, andaddVoiceInstructionListener(text, SSML) for apps doing their own TTS. On Android the player moved fromNavigationViewinto the session.NavigationMapViewon iOS; on Android it moved fromNavigationViewinto the shared map binding. Camera control stayssetCameraState.The
Navigationobject moved tosrc/Navigation.tsso the view can use it without an import cycle.The example app has a new "RNNavigationView" screen next to the headless demo and "NavigationView". It runs a city route or one over the Bay Bridge (lanes, speed limits), simulated or on the device location, and logs arrival, off-route, reroute and voice events.
Changes in this pass:
@rnmapbox/mapspeer and dev dependency are now on main, so they're gone from this diff. The README additions are folded into the new structure.mutenow lives in the session (voiceMuted, published).NavigationViewController's mute button follows it, includingsetVoiceMutedfrom JS. Taps on that button write back into the session, so a later restart keeps the user's choice.Verified locally, since CI doesn't run on a PR against #1's branch: lint, typecheck, 28 unit tests, and iOS and Android example builds. A throwaway draft PR to main (#8, closed) ran CI on this head: all four jobs green. Lint needed one rerun because a partial yarn cache hit skips the env.json step; that's a gap in main's CI, not in this PR.
On the iOS simulator and an Android emulator: RNNavigationView shows the route, banner, lanes, speed limit and trip progress, voice instructions are logged, mute toggles, a pan switches the button to Recenter and Recenter brings back following, and arrival fires once. Restarting after an arrival starts at the full distance on both. NavigationView mute stays in sync with the SDK button and
setVoiceMuted.Still missing compared with
<NavigationView>: road shields and junction views in the banner, sub-maneuver icons, alternative routes on the map during guidance, feedback, day/night styles, and units other than metric in the view's own formatting. Lanes aren't included inRoutesteps.