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