- {this.props.activefires.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.:
- En rojo, {{count: this.props.activefires.length}} fuegos activos en el mapa. Hay un total de {{countTotal: this.props.activefirestotal}} fuegos activos detectados en todo el mundo.
- }
- this.useMarkers(e.target.checked)}>
- Resaltar los fuegos con un marcador
+
+
+ {this.props.activefires.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.:En rojo, {{count: this.props.activefires.length}} fuegos activos en el mapa. Hay un total de {{countTotal: this.props.activefirestotal}} fuegos activos detectados en todo el mundo por la NASA.
+ }
+
+
En naranja, los fuegos notificados por nuestros usuarios/as recientemente.
+
+
+ this.showSubsUnion(e.target.checked)}>
+ Resaltar en verde el área vigilada por nuestros usuarios/as (*)
+
+ this.useMarkers(e.target.checked)}>
+ Resaltar los fuegos con un marcador
+
+
+
-
-
- Fuente NASA y alertas vecinales de nuestr@s usuari@s.
-
-
-
-
+ (*) Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.
);
@@ -210,6 +312,7 @@ const width = new ReactiveVar(400);
FiresMap.propTypes = {
loading: PropTypes.bool.isRequired,
+ subsready: PropTypes.bool.isRequired,
activefires: PropTypes.arrayOf(PropTypes.object).isRequired,
activefirestotal: PropTypes.number.isRequired,
viewport: PropTypes.object.isRequired
@@ -236,13 +339,21 @@ export default translate([], { wait: true }) (withTracker(() => {
});
Meteor.subscribe('activefirestotal');
+ // Right now to all neighborhood alerts
+ Meteor.subscribe('fireAlerts');
+ var userSubs = Meteor.subscribe('userSubsToFires');
// const subscription = Meteor.subscribe('activefiresmyloc', zoom.get());
- console.log(`Active fires ${ActiveFiresCollection.find().fetch().length} of ${Counter.get('countActiveFires')}`);
-
+ // console.log(`Active fires ${ActiveFiresCollection.find().fetch().length} of ${Counter.get('countActiveFires')}`);
+ // console.log(`Active neighborhood fires ${FireAlertsCollection.find().fetch().length} and users subscribed ${UserSubsToFiresCollection.find().fetch().length}`);
+ // console.log(UserSubsToFiresCollection.find().fetch());
return {
loading: !subscription.ready(),
+ subsready: userSubs.ready(),
activefires: ActiveFiresCollection.find().fetch(),
activefirestotal: Counter.get('countActiveFires'),
+ firealerts: FireAlertsCollection.find().fetch().map(
+ doc => ( { _id: doc['_id'], lat: doc['location'].lat, lon: doc['location'].lon })),
+ userSubs: UserSubsToFiresCollection.find().fetch(),
viewport: {
center: [lat.get(), lng.get()], // a point in the sea
zoom: zoom.get(),
diff --git a/imports/ui/pages/FiresMap/FiresMap.scss b/imports/ui/pages/FiresMap/FiresMap.scss
index d78dd7c..09c46fb 100644
--- a/imports/ui/pages/FiresMap/FiresMap.scss
+++ b/imports/ui/pages/FiresMap/FiresMap.scss
@@ -2,7 +2,7 @@
.leaflet-container {
height: 100%;
- min-height: 75vh;
+ min-height: 70vh;
width: 100%;
min-width: 75vw;
display: flex;
@@ -38,3 +38,7 @@ i.location {
width: 35px;
vertical-align: middle;
}
+
+.mark-checkbox {
+ margin-left: 5px;
+}
diff --git a/package.json b/package.json
index 43383fe..928f507 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,10 @@
"jquery": "^2.2.4",
"jquery-validation": "^1.17.0",
"juice": "^4.1.1",
+ "leaflet-geodesy": "^0.2.1",
+ "leaflet-graphicscale": "0.0.2",
"lodash": "^4.17.4",
+ "loms.perlin": "^1.0.1",
"maxmind": "^2.3.0",
"meteor-accounts-t9n": "^2.0.3",
"meteor-node-stubs": "^0.2.11",
@@ -40,7 +43,8 @@
"react-router-bootstrap": "^0.24.3",
"react-router-dom": "^4.2.2",
"reactstrap": "^5.0.0-alpha.3",
- "simpl-schema": "^0.3.2"
+ "simpl-schema": "^0.3.2",
+ "turf-union": "^3.0.12"
},
"devDependencies": {
"babel-jest": "^20.0.3",
diff --git a/public/locales/es/common.json b/public/locales/es/common.json
index 0412b2d..fa7ec65 100644
--- a/public/locales/es/common.json
+++ b/public/locales/es/common.json
@@ -115,9 +115,9 @@
"noActiveFireInMapCount":
"No hay fuegos activos en esta zona del mapa. Hay un total de <1><0>{{countTotal}}0>1> fuegos activos detectados en todo el mundo.",
"activeFireInMapCount":
- "En rojo, <1><0>{{count,number}}0>1> fuegos activos en el mapa. Hay un total de <3><0>{{countTotal,number}}0>3> fuegos activos detectados en todo el mundo.",
+ "En rojo, <1><0>{{count,number}}0>1> fuegos activos en el mapa. Hay un total de <3><0>{{countTotal,number}}0>3> fuegos activos detectados en todo el mundo por la NASA.",
+ "activeNeigFireInMapCount":
+ "En naranja, los fuegos notificados por nuestros usuarios/as recientemente.",
"Centrar el mapa en tu ubicación":
- "Centrar el mapa en tu ubicación",
- "Fuente NASA y alertas vecinales de nuestr@s usuari@s.":
- "Fuente NASA y alertas vecinales de nuestr@s usuari@s."
+ "Centrar el mapa en tu ubicación"
}
diff --git a/public/n-fire-marker.png b/public/n-fire-marker.png
new file mode 100644
index 0000000..65a115d
Binary files /dev/null and b/public/n-fire-marker.png differ