Skip to content

map-ir/mapir-mapbox

Repository files navigation

Mapir SDK for React Native

npm version A React Native library for building maps with the Mapbox Maps SDK for iOS and Mapbox Maps SDK for Android

Map.ir 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

Installation

Dependencies

npm install mapir-react-native-sdk

Platform Specific Installation Guides

Quick start

Import module

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

Generate Component

export default function App() {
  onRegionDidChange = (e) => {
    console.log('onRegionDidChange', e.geometry.coordinates);
  };
  return (
    <SafeAreaView style={styles.container}>
      <View style={styles.container}>
        <Mapir
          apiKey={'YOUR_MAPIR_API_KEY'}
          onRegionDidChange={(e) => onRegionDidChange(e)}
          style={styles.container}
        >
          <Mapir.Camera
            zoomLevel={13}
            centerCoordinate={[51.422548, 35.732573]}
          />
        </Mapir>
      </View>
    </SafeAreaView>
  );
}

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

📖 English Documentation

📖 Persian Documentation

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •