fetch is enough.
1
Install the dependencies
@mapbox/polyline decodes the route geometry the
Directions API returns. Skip it if you are not drawing routes.2
Finish the native setup
MapLibre React Native needs a config plugin on Expo and a pod install on bare React
Native. Follow the
official Expo setup guide
or the bare workflow guide.
3
Store your access token
A shared request helper
Every example in this section builds on the same tiny wrapper, which handles thekey
parameter and unwraps Baato’s response envelope:
baato.js
What’s next
Display a map
Render Baato vector tiles with MapLibre.
Search and autocomplete
Search-as-you-type place suggestions.
Reverse geocoding
Turn a long-press into an address.
Directions
Fetch a route and draw it on the map.
The Baato_in_React_Native repository has
a complete app wiring all of these together.