You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-native-maps-directions accepts flexible origin and destination values — not only { latitude, longitude } objects. Supported formats include comma-separated coordinate strings, human-readable addresses, location names, and Google Place IDs prefixed with place_id:.
<MapViewDirectionsorigin={{latitude: 37.33,longitude: -122.00}}destination="…"/><MapViewDirectionsorigin="37.3317876,-122.0054812"destination="…"/><MapViewDirectionsorigin="Apple Park Visitor Center"destination="…"/><MapViewDirectionsorigin="10600 N Tantau Ave, Cupertino, CA 95014, USA"destination="…"/><MapViewDirectionsorigin="place_id:ChIJW5i0tJC1j4ARoUGtkogTaUU"destination="…"/>
Google Directions API accepts these as query string values directly — no geocoding step is required server-side from our package.
Goal
Support the same location input union type for origin, destination, and waypoints entries:
typeLocationInput=|Coordinate|string;// "lat,lng" | address | place name | "place_id:…"
Scope
Define and export LocationInput type in @nitro-maps/directions.
Normalize all location inputs to the string format expected by Google Directions API:
Coordinate → "lat,lng"
"lat,lng" string → pass through (validate format)
address / location name → URL-encode and pass through
Context
react-native-maps-directions accepts flexible
originanddestinationvalues — not only{ latitude, longitude }objects. Supported formats include comma-separated coordinate strings, human-readable addresses, location names, and Google Place IDs prefixed withplace_id:.Reference: https://github.com/bramus/react-native-maps-directions#an-extra-note-on-origin-and-destination
Google Directions API accepts these as query string values directly — no geocoding step is required server-side from our package.
Goal
Support the same location input union type for
origin,destination, andwaypointsentries:Scope
LocationInputtype in@nitro-maps/directions.Coordinate→"lat,lng""lat,lng"string → pass through (validate format)place_id:…→ pass through unchangedlanguageandregionprops improve accuracy for localized address strings."lat,lng"strings viaonError.Out of scope
Acceptance criteria
Coordinateand"lat,lng"produce identical routes for the same point.place_id:prefix is forwarded correctly to Google Directions API.onError.origin/destination/waypoints).Notes
Depends on #7. Can ship in parallel with #8 if fetch layer is structured with a shared
normalizeLocationInput()helper.