-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (36 loc) · 1.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html lang="fr">
<head>
<meta charset="utf-8">
<title>transiscope en</title>
<script src="https://transiscope-en.gogocarto.fr/js/gogocarto.js?ver=3.2.3"></script>
<link rel="stylesheet" href="https://transiscope-en.gogocarto.fr/css/gogocarto.css?ver=3.2.3">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Ubuntu:500,700" rel="stylesheet">
</head>
<body>
<div id="gogocarto"></div>
<script>
const getConf = async function() {
const responseConf = await fetch('https://transiscope-en.gogocarto.fr/api/gogocartojs-conf.json');
const confRaw = await responseConf.json();
// console.log(confRaw);
const conf={
...confRaw,
language:"en",
}
// console.log(conf);
return conf;
}
document.addEventListener('readystatechange', () => {
if(document.readyState==='complete'){
getConf().then(conf=>{
console.log(conf);
goGoCarto('#gogocarto', conf);
})
// const conf = getConf();
// goGoCarto('#gogocarto', conf);
}
});
</script>
</body>
</html>