Added fires union (wip)
This commit is contained in:
parent
7b5f17fbe8
commit
6abe668740
12 changed files with 216 additions and 40 deletions
48
imports/ui/components/Maps/FirePolygonMark.js
Normal file
48
imports/ui/components/Maps/FirePolygonMark.js
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
import React, { Component } from 'react';
|
||||
import { GeoJSON } from 'react-leaflet';
|
||||
import PropTypes from 'prop-types';
|
||||
import { onMarkClick } from './MarkListeners';
|
||||
import FirePopup from './FirePopup';
|
||||
|
||||
class FirePolygonMark extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.t = props.t;
|
||||
this.onClick = this.onClick.bind(this);
|
||||
}
|
||||
|
||||
onClick() {
|
||||
const { history, nasa, id } = this.props;
|
||||
onMarkClick(history, nasa, id);
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
nasa,
|
||||
id,
|
||||
shape,
|
||||
centerid,
|
||||
history,
|
||||
when,
|
||||
t
|
||||
} = this.props;
|
||||
const lon = centerid.coordinates[0];
|
||||
const lat = centerid.coordinates[1];
|
||||
return (
|
||||
<GeoJSON data={shape} color="orange" stroke width="1" opacity=".2" fillOpacity=".0" />
|
||||
);
|
||||
/* <FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} /> */
|
||||
}
|
||||
}
|
||||
|
||||
FirePolygonMark.propTypes = {
|
||||
id: PropTypes.object.isRequired,
|
||||
nasa: PropTypes.bool.isRequired,
|
||||
shape: PropTypes.object.isRequired,
|
||||
centerid: PropTypes.object.isRequired,
|
||||
history: PropTypes.object.isRequired,
|
||||
when: PropTypes.instanceOf(Date).isRequired,
|
||||
t: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default FirePolygonMark;
|
||||
Loading…
Add table
Add a link
Reference in a new issue