Description
react-native-maps-directions is a component that draws a route between two coordinates on a react-native-maps map. It is powered by the Google Maps Directions API. You render MapViewDirections as a child of a MapView, and the component fetches the route and draws it as a polyline between the origin and destination. Three props are mandatory: origin, the start location, destination, the end location, and apikey, which is your Google Maps Directions API key. The README notes that the Directions API must be enabled for that key in the Google API Console. Origin and destination can be coordinates or strings. When either one changes, new directions are fetched and rendered again. Optional props include waypoints, an array of stops between the origin and destination, language, which defaults to en, and mode, which defaults to DRIVING and sets the transport mode.…
Highlights
- Draws routes on react-native-maps
- Uses the Google Maps Directions API
- Waypoints and transport modes
- Language option and event callbacks
Ratings & Reviews
No ratings yet
Be the first to rate react-native-maps-directions.
People also visit

react-native-google-places-autocomplete
Customizable Google Places autocomplete component for iOS
react-native-maps-directions FAQ
What does react-native-maps-directions do?
It draws a route between two points on a react-native-maps map, using the Google Maps Directions API.
What do I need to use it?
A Google Maps Directions API key, passed as apikey. The API must be enabled for that key in the Google API Console.
Can I add stops along the route?
Yes. The waypoints prop takes an array of stops between the origin and destination.
Which transport modes are available?
The mode prop sets the transport mode and defaults to DRIVING. The README lists the allowed values.
How do I install it?
Install react-native-maps-directions with npm or yarn, as the README's installation section shows.
What are the best react-native-maps-directions alternatives?
Popular alternatives to react-native-maps-directions include rnmapbox/maps, react-native-maps and react-native-google-places-autocomplete. See all react-native-maps-directions alternatives













