Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/map-ir/mapir-mapbox
https://github.com/map-ir/mapir-mapbox
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/map-ir/mapir-mapbox
- Owner: map-ir
- License: mit
- Created: 2019-01-15T17:39:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T06:34:43.000Z (almost 2 years ago)
- Last Synced: 2024-08-08T22:53:13.573Z (3 months ago)
- Language: Java
- Size: 77.3 MB
- Stars: 12
- Watchers: 3
- Forks: 7
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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/)