1.1.0 โ€ข Published 7 months ago

react-native-mapa v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago


Prerequisite

react-native-mapa relies on mapbox, so you need to provide a Mapbox Access Token.

Dependencies

Installation

Please check the installation documentation Installation

Run Project

IOS

# YARN
yarn run ios

# NPM
npm run ios

Android

# YARN
yarn run android

# NPM
npm run android

Example

import Mapa from 'react-native-mapa';
import {SafeAreaView, StyleSheet} from 'react-native';
import React from 'react';

Mapa.setAccessToken(
    'pk.XXX',
);

function Mapview({}: any): React.JSX.Element {
    return (
        <SafeAreaView style={styles.container}>
            <Mapa.MapView>
                <Mapa.Camera />
                <Mapa.Compass />
            </Mapa.MapView>
        </SafeAreaView>
    );
}

export default Mapview;

const styles = StyleSheet.create({
    container: {
        height: '100%',
    },
});

DOCUMENTTATION

Components

Sources

Layers

Draw