Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.2 KB

File metadata and controls

50 lines (38 loc) · 1.2 KB

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