<commit_before>import icons from '../components/map-icons';
import backend from '../services/moonridge';

export class Home {
	constructor(){
    this.bin = backend.model('bin');
    this.poo = backend.model('poo');
	}
  activate(params) {
    if (params.type && params.id) {

      this.selected = this[params.type].liveQuery().findOne({_id: params.id}).exec().promise.then(LQ => {
        console.log('LQ.doc', LQ.doc);
      });
    }

    this.bins = this.bin.liveQuery().find().exec().promise.then(LQ => {
      console.log('bins', LQ.docs);
    });

    this.poos = this.poo.liveQuery().find().exec().promise.then(LQ => {
      console.log('poos', LQ.docs);
    });
  }
  get markers(){
    return [{pos:[50.051611, 14.407032], icon: icons.poo}];
  }<commit_msg>markers now properly mapped and showed on the map<commit_after>import icons from '../components/map-icons';
import backend from '../services/moonridge';

export class Home {
	constructor(){
    this.bin = backend.model('bin');
    this.poo = backend.model('poo');
	}
  activate(params) {
    if (params.type && params.id) {

      this.selected = this[params.type].liveQuery().findOne({_id: params.id}).exec();
    }

    this.bins = this.bin.liveQuery().find().exec();

    this.poos = this.poo.liveQuery().find().exec();
  }
  get markers(){
    var bins = this.bins.docs.map(bin=> {
      var icon = icons.bin.plain;
      if (bin.has_bags === true) {
        icon = icons.bin.good;
      } else if(bin.has_bags === false) {
        icon = icons.bin.bad;
      }
      return {
        pos: bin.loc,
        icon: icon
      };
    });
    var poos = this.poos.docs.map(poo=> {
      return {
        pos: poo.loc,
        icon:  icons.poo
      };
    });
    return bins.concat(poos);
  }
{'fraction_non_alphanumeric': 0.18852924474730268, 'fraction_numerical': 0.009085746734809767, 'mean_word_length': 2.524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5171538', 'n_tokens_mistral': 635, 'n_tokens_neox': 597, 'n_words': 108}