Project Setup

This guide is made based off a basic application already made, to keep most of the code specific to the MapsIndoors SDK. So that we don't need to spend too much time modifying or implementing UI elements. If confident, you can start off by creating your own project, and just taking the context of the different steps of the getting started guide. A short setup of a React native application with MapsIndoors is described below.

Using basic example

Set Up Your Environment

Read here how to set up your React Native development environment

Basic Example

You can find the basic example to start from here: Basic example Follow the included README on how to get the project up and running.

Setup MapsIndoors

To run MapsIndoors you need to insert a google API key inside your project.

Android:

Inside the project navigate to android/app/src/main/res/values/google_maps_api.xml and replace the INSERT_KEY_HERE with your google API key

iOS:

Inside the project navigate to ios/GettingStartedProject/AppDelegate.mm and replace the /*Your Google API key here*/ inside provideAPIKey with your Google API key

Code complete example

During the guide you can use this example to refer to your project, or just play around with the code inside: Getting started

Using Mapbox

While the examples are using google maps, it is also possible to use Mapbox instead with only minor changes to the project.

To do this follow the getting started of this page MapsIndoors Mapbox and replace any imports from @mapsindoors/react-native-maps-indoors-google-maps to @mapsindoors/react-native-maps-indoors-mapbox after this you is done, you can follow the getting started guide without any changes.

Last updated