Skip to content

ilomon10/react-mapbox-gl-editor-components

Repository files navigation

react-mapbox-gl-editor-components

NPM JavaScript Style Guide

Install

npm install --save  [email protected] [email protected] |
                    [email protected] |
                    @mapbox/[email protected] |
                    mapbox-gl 
                    #peerDependencies
npm install --save react-mapbox-gl-editor-components@beta

Usage

import React, { Component } from 'react'
import ReactMapboxGL from 'react-mapbox-gl'

import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css';

import MBEditorComponents from 'react-mapbox-gl-editor-components'

const Map = ReactMapboxGl({
  accessToken: "YOUR.ACCESS.TOKEN"
})

class Example extends Component {
  render () {
    return (
      <Map 
        containerStyle={{
          height: "100vh",
          width: "100vw",
        }}
        style="mapbox://styles/mapbox/streets-v9">
        <MBEditorComponents />
      </Map>
    )
  }
}

License

MIT © ilomon10