Vector Maps for React Native
Advanced User Setup
Using MapLibre GL SDK for React Native for Native apps
MapLibre GL SDK for React Native
MapLibre is an open source project that was forked from Mapbox GL SDK. It is our preferred mapping program for interactive maps due to its modern design and ease of use.
Link | Description |
---|---|
Homepage | The Projects home for Native SDK |
SDK Reference | Information, examples, and plugins |
Github | Source code |
Getting Started
The example code below shows the changes needed to get MapLibre React Native working with our API.
Once familiar, it's recommended to start with the MapLibre React Native website for the most up to date code and install methods.
Add Dependencies
- node
- npm
- React Native (0.74+)
- On Android, API 23 and higher is supported
Installation
Set up a React Native project
If you don't have an existing React Native project, create one:
Install Package
From your React Native project's root directory, add the package via either yarn
or
npm
(pick one).
Review platform specific info
Check out the installation guide(s) for additional information about platform-specific setup, quirks, and steps required before running.
Adding a map
Here is an example minimal App.js
Run it!
iOS
Android
Next Steps
Customize and add features to your new map
Settings & Features
- Common settings and Language Support.
- Content Filtering
- Satellite, Street Level, and other features.
- Compatibility for older browsers.
Map Design
- Customize your maps look
- Night Mode, Greyscale.
- Get the Slpy Style source code.
Search & Geocoding
- Add a search bar to your map.
- Translate addresses to coordinates
- Search for points of interest.