Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
TizziGri committed May 12, 2023
1 parent 56a93cb commit 466e445
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions prototype-1/main.js
Expand Up @@ -85,9 +85,30 @@ setTimeout(() => {

// Stream big file in worker thread
Papa.parse('data/geodaten.csv', {
worker: true,
step: function(results) {
console.log("Row:", results.data);
//worker: true,
download: true,
header: true,
complete: (results) => {

let geodata = [];
results.data.forEach((bro) => {
// hier werden wir aus dem objekt ein koordinaten paar beziehen
const coordpair = [parseFloat(bro['WGS84-N']), parseFloat(bro['WGS84-E'])];
// prüfen ob die koordinaten nummerisch sind
if (typeof coordpair[0] !== 'number'){
return
}
// koordinaten ins array hinzufügen
geodata.push(coordpair);
if (geodata.length < 100) {
L.marker(coordpair).addTo(map);
}

});

//console.log(geodata);


}
});

Expand Down

0 comments on commit 466e445

Please sign in to comment.