Skip to content

Commit

Permalink
Update Readme.md (#1470)
Browse files Browse the repository at this point in the history
  • Loading branch information
davizp authored Jul 30, 2021
1 parent fce82f1 commit 7475486
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 25 deletions.
67 changes: 42 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,67 +25,84 @@ We also support [MapLibre](https://github.com/maplibre/maplibre-gl-native) flavo
height="300"
/>

## Installation
### Prerequisit
On Android we support from version 6 (API 23) upwards
## Prerequisite

1. On Android we support from version 6 (API 23) upwards
2. Please [Sign Up to Mapbox](https://account.mapbox.com/auth/signup/) to get the Mapbox Access Token.


### Dependencies
## Dependencies

- [node](https://nodejs.org)
- [npm](https://www.npmjs.com/)
- [React Native](https://facebook.github.io/react-native/) (0.60+)

### Git

```
git clone git@github.com:react-native-mapbox-gl/maps.git
cd maps
```
## Installation

### Yarn
### Step 1 - Install Package:

```
```sh
# install with Yarn
yarn add @react-native-mapbox-gl/maps
```

### Npm

```
# or install with NPM
npm install @react-native-mapbox-gl/maps --save
```

## Installation Guides
### Step 2 - Installation Guides:

- [Android](/android/install.md)
- [iOS](/ios/install.md)
- [Expo](/plugin/install.md)
- [Example](/example)


## Getting Started
### Getting Started
For more information, check out our [Getting Started](/docs/GettingStarted.md) section

### Adding a map
## Run Project
Before you run your project be sure you have completeded the Installation Guides for Android or iOS.

### Run iOS Simulator
```sh
# Run with NPM
yarn run ios

# or Run with NPM
npm run ios
```

### Run Android Simulator
```sh
# Run with NPM
yarn run android

# or Run with NPM
npm run android
```

## Adding a map

```js
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";
import MapboxGL from "@react-native-mapbox-gl/maps";
import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import MapboxGL from '@react-native-mapbox-gl/maps';

MapboxGL.setAccessToken("<YOUR_ACCESSTOKEN>");
MapboxGL.setAccessToken('<YOUR_ACCESSTOKEN>');

const styles = StyleSheet.create({
page: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF'
},
container: {
height: 300,
width: 300,
backgroundColor: "tomato"
backgroundColor: 'tomato'
},
map: {
flex: 1
Expand Down
8 changes: 8 additions & 0 deletions ios/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ Add the following to your `ios/Podfile`:

Running `pod install` will add Mapbox iOS SDK `5.8.0`

```sh
# Go to the ios folder
cd ios

# Run Pod Install
pod install
```

You are good to go!

Read on if you want to edit your Mapbox version or flavor.
Expand Down

0 comments on commit 7475486

Please sign in to comment.