kopia lustrzana https://github.com/geodienst/lighthousemap
Updated data and a few fixes
rodzic
274cece2a1
commit
514fac7a48
59650
data-full.json
59650
data-full.json
Plik diff jest za duży
Load Diff
18
index.html
18
index.html
|
@ -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)
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -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?');
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue