Added industries collection

This commit is contained in:
vjrj 2018-02-26 12:11:23 +01:00
parent 1ad6bf17cb
commit ccbfe642a8
19 changed files with 277 additions and 58 deletions

View file

@ -1,22 +1,40 @@
import React from 'react';
import React, { Component } from 'react';
import { Circle } from 'react-leaflet';
import PropTypes from 'prop-types';
import { onMarkClick } from './MarkListeners';
import FirePopup from './FirePopup';
const FireCircleMark = ({
lat,
lon,
nasa,
scan,
id,
when,
history,
t
}) => (
<Circle center={[lat, lon]} color="red" stroke={false} fillOpacity="1" fill radius={scan * 1000}>
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
</Circle>
);
class FireCircleMark 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 {
lat,
lon,
scan,
nasa,
id,
history,
when,
t
} = this.props;
return (
<Circle center={[lat, lon]} color="red" stroke={false} fillOpacity="1" fill radius={scan * 500} onClick={this.onClick}>
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
</Circle>
);
}
}
FireCircleMark.propTypes = {
scan: PropTypes.number.isRequired,