Add inspection map

This commit is contained in:
Lukas Martinelli
2016-12-24 14:42:57 +01:00
parent 04eab70e27
commit f332d517f3
9 changed files with 232 additions and 48 deletions

View File

@@ -1,10 +1,16 @@
import React from 'react'
import Map from './Map'
import style from '../../libs/style.js'
class OpenLayers3Map extends Map {
constructor(props) {
super(props)
class OpenLayers3Map extends React.Component {
static propTypes = {
onDataChange: React.PropTypes.func,
mapStyle: React.PropTypes.object.isRequired,
accessToken: React.PropTypes.string,
}
static defaultProps = {
onMapLoaded: () => {},
onDataChange: () => {},
}
componentWillReceiveProps(nextProps) {
@@ -63,6 +69,18 @@ class OpenLayers3Map extends Map {
this.setState({ map });
})
}
render() {
return <div
ref={x => this.container = x}
style={{
position: "fixed",
top: 0,
bottom: 0,
height: "100%",
width: "100%",
}}></div>
}
}
export default OpenLayers3Map