2016-09-08 19:47:29 +02:00
|
|
|
import React from 'react';
|
2016-09-08 21:42:18 +02:00
|
|
|
import MapboxGl from 'mapbox-gl';
|
2016-09-08 19:47:29 +02:00
|
|
|
|
|
|
|
export class Map extends React.Component {
|
2016-09-08 20:35:21 +02:00
|
|
|
constructor(props) {
|
2016-09-08 21:42:18 +02:00
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
MapboxGl.accessToken = "pk.eyJ1IjoibW9yZ2Vua2FmZmVlIiwiYSI6IjIzcmN0NlkifQ.0LRTNgCc-envt9d5MzR75w";
|
|
|
|
const map = new MapboxGl.Map({
|
|
|
|
container: this.container,
|
|
|
|
style: "mapbox://styles/morgenkaffee/cirqasdb8003dh1ntbo6dkvs6"
|
|
|
|
});
|
2016-09-08 20:35:21 +02:00
|
|
|
}
|
|
|
|
|
2016-09-08 19:47:29 +02:00
|
|
|
render() {
|
2016-09-08 21:42:18 +02:00
|
|
|
return <div ref={x => this.container = x} style={{zIndex: 15}}></div>
|
2016-09-08 19:47:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|