Fire industries marks
This commit is contained in:
parent
eca58df6c2
commit
735dd55531
10 changed files with 126 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import React from 'react';
|
||||
import { CircleMarker, Marker } from 'react-leaflet';
|
||||
import PropTypes from 'prop-types';
|
||||
import { fireIcon, nFireIcon } from '/imports/ui/components/Maps/Icons';
|
||||
import { fireIcon, nFireIcon, industryIcon } from '/imports/ui/components/Maps/Icons';
|
||||
import { translate } from 'react-i18next';
|
||||
import FirePopup from './FirePopup';
|
||||
|
||||
|
|
@ -12,16 +12,24 @@ const FireIconMark = ({
|
|||
nasa,
|
||||
id,
|
||||
history,
|
||||
falsePositives,
|
||||
when,
|
||||
t
|
||||
}) => (
|
||||
<div>
|
||||
<Marker position={[lat, lon]} icon={nasa ? fireIcon : nFireIcon}>
|
||||
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
||||
</Marker>
|
||||
<CircleMarker center={[lat, lon]} color={nasa ? 'red' : '#D35400'} stroke={false} fillOpacity="1" fill radius={1}>
|
||||
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
||||
</CircleMarker>
|
||||
{ !falsePositives &&
|
||||
<Marker position={[lat, lon]} icon={nasa ? fireIcon : nFireIcon}>
|
||||
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
||||
</Marker> }
|
||||
{ falsePositives &&
|
||||
<Marker position={[lat, lon]} icon={industryIcon}>
|
||||
{ /* disabled because was a past fire (and can be marked multiple times) */ false && <FirePopup t={t} history={history} id={id} lat={lat} lon={lon} /> }
|
||||
</Marker>
|
||||
}
|
||||
{ !falsePositives &&
|
||||
<CircleMarker center={[lat, lon]} color={nasa ? 'red' : '#D35400'} stroke={false} fillOpacity="1" fill radius={1}>
|
||||
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
||||
</CircleMarker> }
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
@ -29,10 +37,11 @@ FireIconMark.propTypes = {
|
|||
// https://github.com/PaulLeCam/react-leaflet/tree/master/src/propTypes
|
||||
lat: PropTypes.number.isRequired,
|
||||
lon: PropTypes.number.isRequired,
|
||||
nasa: PropTypes.bool.isRequired,
|
||||
nasa: PropTypes.bool,
|
||||
falsePositives: PropTypes.bool.isRequired,
|
||||
id: PropTypes.object.isRequired,
|
||||
history: PropTypes.object.isRequired,
|
||||
when: PropTypes.instanceOf(Date).isRequired,
|
||||
when: PropTypes.instanceOf(Date),
|
||||
t: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue