+
+ {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
+
-
-
-
- Fuentes: NASA y alertas vecinales de nuestr@s usuari@s
+ Fuente NASA y alertas vecinales de nuestr@s usuari@s.
@@ -214,6 +205,8 @@ const geoip = new ReactiveVar('');
const zoom = new ReactiveVar(8);
const lat = new ReactiveVar(DEF_LAT);
const lng = new ReactiveVar(DEF_LNG);
+const height = new ReactiveVar(400);
+const width = new ReactiveVar(400);
FiresMap.propTypes = {
loading: PropTypes.bool.isRequired,
@@ -222,6 +215,14 @@ FiresMap.propTypes = {
viewport: PropTypes.object.isRequired
};
+Meteor.call("geo", function (error, response) {
+ if (error) {
+ console.warn(error);
+ } else {
+ geoip.set([response.location.latitude, response.location.longitude] );
+ }
+});
+
export default translate([], { wait: true }) (withTracker(() => {
var subscription;
Meteor.autorun(function() {
@@ -230,17 +231,10 @@ export default translate([], { wait: true }) (withTracker(() => {
// also stop all subscriptions when this template is destroyed.
if (zoom.get())
// TODO select position
- subscription = Meteor.subscribe('activefiresmyloc', zoom.get(), lat.get(), lng.get());
+ subscription = Meteor.subscribe('activefiresmyloc', zoom.get(), lat.get(), lng.get(), height.get(), width.get());
});
Meteor.subscribe('activefirestotal');
// const subscription = Meteor.subscribe('activefiresmyloc', zoom.get());
- Meteor.call("geo", function (error, response) {
- if (error) {
- console.warn(error);
- } else {
- geoip.set([response.location.latitude, response.location.longitude] );
- }
- });
return {
loading: !subscription.ready(),
diff --git a/imports/ui/pages/FiresMap/FiresMap.scss b/imports/ui/pages/FiresMap/FiresMap.scss
index 7b0cef3..d78dd7c 100644
--- a/imports/ui/pages/FiresMap/FiresMap.scss
+++ b/imports/ui/pages/FiresMap/FiresMap.scss
@@ -23,10 +23,10 @@
}
@media only screen and (max-width: 400px) {
- /* .leaflet-container {
+ .leaflet-container {
height: 500px;
width: 85vw;
- } */
+ }
}
i.location {
diff --git a/imports/ui/pages/Index/Index.js b/imports/ui/pages/Index/Index.js
index ff98ff4..ad3be41 100644
--- a/imports/ui/pages/Index/Index.js
+++ b/imports/ui/pages/Index/Index.js
@@ -5,6 +5,7 @@ import {render} from 'react-dom';
import { Link } from 'react-router-dom';
// https://www.npmjs.com/package/react-resize-detector
import ReactResizeDetector from 'react-resize-detector';
+import FiresMap from '../FiresMap/FiresMap';
import './Index.scss';
import './Index-custom.scss';
@@ -119,6 +120,13 @@ class Index extends Component {
{this.props.t('Participa')}
+
+
+
+
+
+
+
);
};
diff --git a/package.json b/package.json
index b1aa096..43383fe 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"jquery-validation": "^1.17.0",
"juice": "^4.1.1",
"lodash": "^4.17.4",
+ "maxmind": "^2.3.0",
"meteor-accounts-t9n": "^2.0.3",
"meteor-node-stubs": "^0.2.11",
"moment": "^2.19.2",
diff --git a/public/fire-marker.png b/public/fire-marker.png
new file mode 100644
index 0000000..0a20859
Binary files /dev/null and b/public/fire-marker.png differ
diff --git a/public/locales/es/common.json b/public/locales/es/common.json
index b96300d..0412b2d 100644
--- a/public/locales/es/common.json
+++ b/public/locales/es/common.json
@@ -112,8 +112,12 @@
"Fuegos activos",
"Fuegos activos":
"Fuegos activos",
+ "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":
- "Fuegos activos en el mapa {{count,number}} de un total de {{countTotal,number}} fuegos activos detectados en 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.",
"Centrar el mapa en tu ubicación":
- "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."
}