Skip to content

React Native Mapa

Simple and easy-to-use React Native map component



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