npm install --save [email protected] [email protected] |
[email protected] |
@mapbox/[email protected] |
mapbox-gl
#peerDependencies
npm install --save react-mapbox-gl-editor-components@beta
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>
)
}
}
MIT © ilomon10