diff --git a/imports/ui/pages/FiresMap/FiresMap.js b/imports/ui/pages/FiresMap/FiresMap.js
index 8cbfb45..ffbf2f2 100644
--- a/imports/ui/pages/FiresMap/FiresMap.js
+++ b/imports/ui/pages/FiresMap/FiresMap.js
@@ -81,19 +81,21 @@ class FiresMap extends React.Component {
handleViewportChange(viewport) {
console.log(`Viewport changed: ${JSON.stringify(viewport)}`);
- const bounds = this.getMap().getBounds();
- // console.log(bounds);
- mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
- store.set('firesmap_center', viewport.center);
- store.set('firesmap_zoom', viewport.zoom);
- if (viewport.center === this.state.viewport.center &&
- viewport.zoom === this.state.viewport.zoom) {
- // Do nothing, in same point
- return;
+ if (this.fireMap) {
+ const bounds = this.getMap().getBounds();
+ // console.log(bounds);
+ mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
+ store.set('firesmap_center', viewport.center);
+ store.set('firesmap_zoom', viewport.zoom);
+ if (viewport.center === this.state.viewport.center &&
+ viewport.zoom === this.state.viewport.zoom) {
+ // Do nothing, in same point
+ return;
+ }
+ zoom.set(viewport.zoom);
+ center.set(viewport.center);
+ this.setState({ viewport });
}
- zoom.set(viewport.zoom);
- center.set(viewport.center);
- this.setState({ viewport });
}
centerOnUserLocation(viewport) {
@@ -149,117 +151,117 @@ class FiresMap extends React.Component {
ref={(divElement) => { this.divElement = divElement; }}
>
{ !isHome() &&
-
- {title}
-
- }
- {this.props.loading || !this.props.subsready ?
-
-
-
- : ''}
-
Fuegos activos
-
-
-
- { (this.props.activefires.length + this.props.firealerts.length) === 0 ?
- No hay fuegos activos en esta zona del mapa. Hay un total de {{ countTotal: this.props.activefirestotal }} fuegos activos detectados en todo el mundo. Datos actualizados . :
- En rojo, {{ count: this.props.activefires.length + this.props.firealerts.length }} fuegos activos en el mapa. Hay un total de {{ countTotal: this.props.activefirestotal }} fuegos activos detectados en todo el mundo por la NASA. Datos actualizados .
- }
-
- {isNotHomeAndMobile &&
- En naranja, los fuegos notificados por nuestros usuarios/as recientemente.
}
-
-
- {isNotHomeAndMobile &&
+
+ {title}
+
+ }
+ {this.props.loading || !this.props.subsready ?
+
+
+
+ : ''}
+ Fuegos activos
+
+
+
+ { (this.props.activefires.length + this.props.firealerts.length) === 0 ?
+ No hay fuegos activos en esta zona del mapa. Hay un total de {{ countTotal: this.props.activefirestotal }} fuegos activos detectados en todo el mundo. Datos actualizados . :
+ En rojo, {{ count: this.props.activefires.length + this.props.firealerts.length }} fuegos activos en el mapa. Hay un total de {{ countTotal: this.props.activefirestotal }} fuegos activos detectados en todo el mundo por la NASA. Datos actualizados .
+ }
+
+ {isNotHomeAndMobile &&
+ En naranja, los fuegos notificados por nuestros usuarios/as recientemente.
}
+
+
+ {isNotHomeAndMobile &&
+
+ this.setShowSubsUnion(e.target.checked)}>
+ Resaltar en verde el área vigilada por nuestros usuarios/as (*)
+
+ {(this.state.viewport.zoom >= MAXZOOM) &&
+ this.useMarkers(e.target.checked)}>
+ Resaltar los fuegos con un marcador
+ }
+ }
+
+ { this.state.viewport.zoom >= MAXZOOMREACTIVE ?
+ Los fuegos activos se actualizan en tiempo real. :
+ Haga zoom en una zona de su interés si quiere que los fuegos se actualicen en tiempo real.
+ }
+
+
+
+
+ {/* https://github.com/CliffCloud/Leaflet.Sleep */}
+
- {/* https://github.com/CliffCloud/Leaflet.Sleep */}
-
-
-
- (*)Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.
-
-
- { !isHome() &&
-
- }
+ = MAXZOOM}
+ useMarkers={this.state.useMarkers}
+ nasa={false}
+ falsePositives
+ />
+ = MAXZOOM}
+ useMarkers={this.state.useMarkers}
+ nasa
+ falsePositives={false}
+ />
+
+ }
+
+
+
+ this.centerOnUserLocation(viewport)} onlyIcon {... this.props} />
+
+
+
+
+
+ (*)Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.
+
+
+ { !isHome() &&
+
+ }
);
}