ignite-mapbox
v0.0.16
Published
Ignite plugin that adds react-native-mapbox support.
Downloads
7
Readme
You can install mapbox and link it by this command
ignite add map
and generate a map component with
ignite generate map MapName
then use it as below
and you can get your token key with instructions inside mapbox github https://github.com/mapbox/react-native-mapbox-gl
then you can use token key inside App>Config>MapboxConfig.tsx
Usage :
import MapboxGL from '@mapbox/react-native-mapbox-gl';
import MapboxConfig from "../../Config/MapboxConfig";
MapboxGL.setAccessToken(MapboxConfig.accessToken); // here you set access token
...
<MapboxGL.MapView
styleURL={ColorScheme.mapStyleUrl}
zoomLevel={15}
centerCoordinate={[51.3890,35.6892]}
style={{flex:1}}
>
</MapboxGL.MapView>