Repository navigation
feat: puck prop on NavigationViewport - #34
Merged
Merged
Conversation
mfazekas
force-pushed
the
feat/navigation-puck
branch
from
October 29, 2026 06:01
93dc03f to
ce863bb
Compare
Sets the location puck of a navigation map from LocationPuck's visible, bearingImage, scale and model props. iOS builds the NavigationMapView puckType from them, Android the LocationPuck2D/3D; without the prop the SDK's puck shows as before. Changes apply during guidance. The example's navigation screen gets a puck chip (default, arrow image, 3D car, hidden). Fixes #33
mfazekas
force-pushed
the
feat/navigation-puck
branch
from
October 29, 2026 07:59
ce863bb to
7e03308
Compare
mfazekas
marked this pull request as ready for review
November 2, 2026 04:23
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.
Fixes #33
Adds a
puckprop to<NavigationViewport>withLocationPuck'svisible,bearingImage,scaleandmodel(the type is picked from@rnmapbox/maps'LocationPuckprops, not duplicated). The binding still owns the puck: iOS builds.puck2D/.puck3Dfrom the props, starting from the SDK's navigation defaults, wherever it set.puck3D(.navigationDefault). Android builds aLocationPuck2D/LocationPuck3Dinstead ofcreateDefault2DPuck.visible: falsehides the puck while the location keeps flowing, so the traveled route line still shrinks. Without the prop nothing changes. The example's navigation screen gets a "Puck" chip during guidance that cycles default / arrow image / 3D car / hidden.Verified on the iOS simulator and the Android emulator during simulated guidance, switching options mid-route each time:
puckprop): the SDK's 3D puck on iOS and its 2D puck on Android, as before;bearingImagefrom<Images>: shows, and with the camera idle it points north on Beale St and west after the turn onto Mission St on both platforms;Also ran lint, typecheck, tests and
yarn docs.Limitations:
scaleonly applies to thebearingImagepuck;topImage,shadowImage,pulsingandpuckBearingaren't supported (the puck always follows the course). On iOS abearingImagethat isn't in the style yet is looked up again on every location update, and the SDK's puck shows until it's there.LocationPuckstill doesn't work on navigation maps, and the README says to use this prop instead. The example's 3D car loads from the rnmapbox/maps repo on GitHub, so that option needs network access.