Added cron tweets for active fires in 'es' and 'pt'

This commit is contained in:
vjrj 2018-03-17 20:06:00 +01:00
parent c99559d442
commit 0c56bcf7e0
9 changed files with 252 additions and 3 deletions

View file

@ -18,7 +18,8 @@ Meteor.publish('falsePositivesTotal', function total() {
export const firesUnion = (fires) => {
const group = new L.FeatureGroup();
const remap = fires.fetch().map(function remap(doc) {
const firesArray = Array.isArray(fires) ? fires : fires.fetch(); // if not is a cursor
const remap = firesArray.map(function remap(doc) {
// default scan: 1 for neightbor alerts
return { location: { lat: doc.lat, lon: doc.lon }, distance: doc.scan || 1 };
});