Voor dit soort etappes trouwens perfect..
Als je naar onderstaande link gaat:
https://racecenter.letour.fr/en/riders/6
En op die pagina onderstaande script in je java console plakt, dan kun je live de GPS gegevens (?) zien.
var max_gap = 5;
var max_slow_speed = 10;
var gc = ',161,11,131,51,121,1,14,81,164,141,31,104,61,101,41,22,94,91,3,';
var green = ',43,21,135,151,117,211,203,191,181,167,174,128,105,18,107,108,37,181,64,';
//var scorito = ',1,7,11,14,16,18,21,24,41,43,51,76,104,114,121,131,151,167,191,203,';
var xmlhttp = new XMLHttpRequest();
var url = "/api/allCompetitors-2020";
var peloton = [];
var riders_prev = [];
var velofacts = new EventSource('/live-stream');
var velofacts = new EventSource(‘/live-stream’;);
str_pad_left = function (string,pad,length) {
return (new Array(length+1).join(pad)+string).slice(-length);
};
prety_time = function (s) {
var minutes = Math.floor(s / 60);
var seconds = s - minutes * 60;
return str_pad_left(minutes,'0',2)+':'+str_pad_left(seconds,'0',2);
};
var style = document.createElement('style');
style.innerHTML = '.col-md-2.gc{background-color:#fff1be;border:1px solid #ffc802}.col-md-2.green{border:1px solid #23902f;background:#5dc35d;color:#fff}.col-md-2.scorito{background-color:#ca7090;border:1px solid #ae456b;color:#fff}.col-md-2.slow{color:#fff;background-color:#000}.row>.col-md-2{margin:3px}.row{justify-content:center}.group{border:1px solid #b9b9b9;margin:10px;background:#f9f9f9;box-shadow:0 0 6px 0 rgb(0 0 0 / 10%);position:relative}.group:first-child{background:#eaffed;border:1px solid #45ae51}#q-app{width:95%;font-family:Verdana,sans-serif;font-size:12px;margin:0 auto}.col-md-2{padding:2px 5px;border:1px solid #dadada;background:#fbfbfb;border-radius:5px}body,html{width:100%}body{counter-reset:my-sec-counter my-group-counter 1}.group:before{counter-increment:my-sec-counter;content:"Group " counter(my-sec-counter);position:absolute;top:5px;left:5px;background:#757575;color:#fff;padding:1px 5px;border-radius:5px;border:1px solid #3a3a3a}.col-md-2 span{background:#e4e4e4;color:#252525;border:1px solid #8a8a8a;padding:0 2px;border-radius:5px}.groupDifStart:before{counter-increment:my-group-counter;content:"Group " counter(my-group-counter) ": ";margin:3px}#q-app{display:flex}.rowWrapper{flex:85% 0 0}.groupWrapper{display:flex;flex-direction:column;background:#ffffe7;border:1px solid #f0fd0a;padding:10px;margin:10px;box-shadow:0 0 6px 0 rgba(0,0,0,.1)}.groupDifStart{border-bottom:1px solid #ff9800}';
document.head.appendChild(style);
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
tmp = JSON.parse(this.responseText);
for (var i=0; i < tmp.length; i++) {peloton [tmp.bib] = tmp.lastnameshort + ' ' + tmp.firstname}
}
start_listening();
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
function start_listening() {
velofacts.addEventListener("update", function (e) {
d = JSON.parse(e.data);
var html = '
';
riders_prev = riders;
}
});
}
edit: die gare smiley's mag je vervangen door een )
Log in via je wielerflits.nl account om deel te nemen aan de discussie.