Fire neighbour icon
This commit is contained in:
parent
72f4ee7fd2
commit
d2d9b2cf05
4 changed files with 12 additions and 3 deletions
|
|
@ -38,6 +38,7 @@ class FireIconMark extends Component {
|
|||
history,
|
||||
falsePositives,
|
||||
industries,
|
||||
neighbour,
|
||||
when,
|
||||
t
|
||||
} = this.props;
|
||||
|
|
@ -81,6 +82,7 @@ FireIconMark.propTypes = {
|
|||
nasa: PropTypes.bool,
|
||||
falsePositives: PropTypes.bool.isRequired,
|
||||
industries: PropTypes.bool.isRequired,
|
||||
neighbour: PropTypes.bool.isRequired,
|
||||
id: PropTypes.object.isRequired,
|
||||
history: PropTypes.object.isRequired,
|
||||
when: PropTypes.instanceOf(Date),
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ import FirePixel from '/imports/ui/components/Maps/FirePixel';
|
|||
|
||||
export default function FireList(props) {
|
||||
const {
|
||||
fires, scale, useMarkers, nasa, t, history, falsePositives, industries
|
||||
fires, scale, useMarkers, nasa, t, history, falsePositives, industries, neighbour
|
||||
} = props;
|
||||
const useMarks = useMarkers && scale;
|
||||
const usePixel = !nasa || !scale;
|
||||
/* console.log(`Using marks: ${useMarks}, using pixels: ${usePixel}`); */
|
||||
let items;
|
||||
if (useMarks) {
|
||||
items = fires.map(({ _id, ...otherProps }) => (<FireIconMark t={t} history={history} id={_id} key={_id} nasa={nasa} falsePositives={falsePositives} industries={industries} {...otherProps} />));
|
||||
items = fires.map(({ _id, ...otherProps }) => (<FireIconMark t={t} history={history} id={_id} key={_id} nasa={nasa} neighbour={neighbour} falsePositives={falsePositives} industries={industries} {...otherProps} />));
|
||||
} else if (usePixel && !falsePositives && !industries) {
|
||||
items = fires.map(({ _id, ...otherProps }) => (<FirePixel t={t} key={_id} id={_id} history={history} nasa={nasa} {...otherProps} />));
|
||||
} else if (!falsePositives && !industries) {
|
||||
|
|
@ -32,6 +32,7 @@ FireList.propTypes = {
|
|||
nasa: PropTypes.bool.isRequired,
|
||||
falsePositives: PropTypes.bool.isRequired,
|
||||
industries: PropTypes.bool.isRequired,
|
||||
neighbour: PropTypes.bool.isRequired,
|
||||
history: PropTypes.object.isRequired,
|
||||
t: PropTypes.func.isRequired
|
||||
};
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ class Fire extends React.Component {
|
|||
useMarkers
|
||||
nasa={false}
|
||||
falsePositives
|
||||
neighbour={false}
|
||||
industries={false}
|
||||
/>
|
||||
<FireList
|
||||
|
|
@ -134,6 +135,7 @@ class Fire extends React.Component {
|
|||
useMarkers
|
||||
nasa={false}
|
||||
falsePositives={false}
|
||||
neighbour={false}
|
||||
industries
|
||||
/>
|
||||
<DefMapLayers satellite />
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@ class FiresMap extends React.Component {
|
|||
useMarkers={this.state.useMarkers}
|
||||
nasa={false}
|
||||
falsePositives
|
||||
neighbour={false}
|
||||
industries={false}
|
||||
/>
|
||||
<FireList
|
||||
|
|
@ -310,6 +311,7 @@ class FiresMap extends React.Component {
|
|||
scale={this.state.viewport.zoom >= MAXZOOM}
|
||||
useMarkers={this.state.useMarkers}
|
||||
nasa={false}
|
||||
neighbour={false}
|
||||
falsePositives={false}
|
||||
industries
|
||||
/>
|
||||
|
|
@ -320,6 +322,7 @@ class FiresMap extends React.Component {
|
|||
scale={this.state.viewport.zoom >= MAXZOOM}
|
||||
useMarkers={this.state.useMarkers}
|
||||
nasa
|
||||
neighbour={false}
|
||||
falsePositives={false}
|
||||
industries={false}
|
||||
/>
|
||||
|
|
@ -327,9 +330,10 @@ class FiresMap extends React.Component {
|
|||
t={t}
|
||||
history={this.props.history}
|
||||
fires={this.props.firealerts}
|
||||
scale={false}
|
||||
scale={this.state.viewport.zoom >= MAXZOOM}
|
||||
useMarkers={this.state.useMarkers}
|
||||
nasa={false}
|
||||
neighbour
|
||||
falsePositives={false}
|
||||
industries={false}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue