Updated data and a few fixes

pull/3/head
Nick Ubels 2019-06-28 16:28:16 +02:00
rodzic 274cece2a1
commit 514fac7a48
3 zmienionych plików z 50879 dodań i 8792 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -112,6 +112,14 @@
let query = document.getElementById('seamap-query').textContent
.replace(/\{\{bbox\}\}/g, bbox(bounds).join(','));
// // Query the entire world
// bounds = [-90, -180, 90, 180]
// let query = document.getElementById('seamap-query').textContent
// .replace(/\{\{bbox\}\}/g, bounds.join(','));
let url = 'https://www.overpass-api.de/api/interpreter?data=' + encodeURIComponent(query);
url = 'data-full.json'; // For testing
@ -169,8 +177,14 @@
lights.then(layer => {
let draw = function(t) {
layer.eachVisibleLayer(marker => {
let state = marker.options.sequence.state(t);
marker.setColor(state ? (useRealColors ? state : '#FF0') : false);
var state = false
try{
var state = marker.options.sequence.state(t);
marker.setColor(state ? (useRealColors ? state : '#FF0') : false);
} catch(e){
// console.error(e)
}
});
};

Wyświetl plik

@ -158,7 +158,7 @@ L.Light.Sequence = class {
state = false;
step = step.substring(1, step.length - 1);
}
return [state, parseFloat(step, 10)];
return [state, parseFloat(step.replace(',', '.'), 10)];
});
this.duration = this.steps.reduce((sum, step) => sum + step[1], 0);
@ -178,7 +178,6 @@ L.Light.Sequence = class {
else
dt -= this.steps[i][1];
}
throw new Error('Ran out of steps while still inside duration?');
}
}