Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/map-ir/mapir-mapbox


https://github.com/map-ir/mapir-mapbox

Last synced: about 6 hours ago
JSON representation

Awesome Lists containing this project

README

        

# Mapir SDK for React Native

[![npm version](https://badge.fury.io/js/mapir-mapbox.svg)](https://badge.fury.io/js/mapir-mapbox.svg)
_A React Native library for building maps with the [Mapbox Maps SDK for iOS](https://www.mapbox.com/ios-sdk/) and [Mapbox Maps SDK for Android](https://www.mapbox.com/android-sdk/)_

![Map.ir](https://map.ir/css/images/mapir-logo.png) React Native wrapper for mapbox-gl-js. Expose a bunch of component meant to be simple to use for React Native.

## Get API Key
🔑 You should first get api key from [Map.ir](https://corp.map.ir/registration/)

## Installation

**Dependencies**

* [node](https://nodejs.org)
* [npm](https://www.npmjs.com/)
* [React Native](https://facebook.github.io/react-native/) recommended version ^0.62.2

```
npm install mapir-react-native-sdk
```

### Platform Specific Installation Guides

* [Android](https://github.com/map-ir/mapir-mapbox/blob/master/android/install.md)
* [iOS](https://github.com/map-ir/mapir-mapbox/blob/master/ios/install.md)
* [example](https://github.com/map-ir/Mapir-react-native-example)

## Quick start

### Import module

```js
import React, {Component} from 'react';
import { SafeAreaView, StyleSheet, View} from 'react-native';
import Mapir from 'mapir-react-native-sdk'
```

### Generate Component
```jsx
export default function App() {
onRegionDidChange = (e) => {
console.log('onRegionDidChange', e.geometry.coordinates);
};
return (


onRegionDidChange(e)}
style={styles.container}
>




);
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
});
```

📖 [English Documentation](https://github.com/map-ir/mapir-react-native-sdk/wiki/Documentation)

📖 [Persian Documentation](https://support.map.ir/developers/reactnative/)