9 Commits

Author SHA1 Message Date
Râu Cao fc4c63b519 1.5.0 2022-09-13 07:55:53 +02:00
Râu Cao fe1c9f6300 Adjust for multiple tracked POIs 2022-09-13 07:55:09 +02:00
Râu Cao 0d66bc1266 1.4.0 2022-09-11 12:31:26 +02:00
Râu Cao ba3982d9a6 Add plausible analytics script 2022-09-11 12:30:52 +02:00
Râu Cao f2cc9a9783 1.3.0 2022-09-09 20:29:41 +02:00
Râu Cao 0c1aeebdf7 Load current tour status from server 2022-09-09 20:29:18 +02:00
Râu Cao 3324a57206 Update route 2022-09-09 20:29:00 +02:00
Râu Cao cf8e6882f8 1.2.1 2022-09-08 09:49:18 +02:00
Râu Cao 6c4959deda Hackety hack, no time 2022-09-08 09:48:51 +02:00
11 changed files with 46582 additions and 52842 deletions
-11
View File
File diff suppressed because one or more lines are too long
+11
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+2 -1
View File
@@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Road2Bitcoin Live Map</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css">
<script type="module" crossorigin src="/assets/index.098b1da4.js"></script>
<script defer data-domain="r2b22.kip.pe" src="https://plausible.io/js/plausible.js"></script>
<script type="module" crossorigin src="/assets/index.892cac62.js"></script>
<link rel="stylesheet" href="/assets/index.eed9f443.css">
</head>
<body>
+46326 -52595
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Road2Bitcoin Live Map</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css">
<script defer data-domain="r2b22.kip.pe" src="https://plausible.io/js/plausible.js"></script>
</head>
<body>
<div id="map"><div id="popup"></div></div>
+12 -5
View File
@@ -13,6 +13,7 @@ import geojsonPOI from './geo/poi.json'
useGeographic();
async function main() {
const styles = {
lineOrange: new Style({
stroke: new Stroke({
@@ -60,7 +61,9 @@ const styles = {
// Route
//
const lastStageFinished = 1;
const tourStatus = await fetch('https://r2b22.kip.pe/status.json').then(res => res.json());
const lastStageFinished = tourStatus.lastStageFinished;
const stagesCompleted = geojsonRoute.features.slice(0, lastStageFinished);
const stagesAhead = geojsonRoute.features.slice(lastStageFinished);
const vectorSourceStagesCompleted = new VectorSource();
@@ -219,8 +222,8 @@ map.on('movestart', disposePopover);
//
const updateInterval = 5000;
let followedFeature = vanFeature;
let followedZoomed = false;
// let followedFeature = vanFeature;
// let followedZoomed = false;
// let followedFeature = null;
function startFollowing(feature, followLink) {
@@ -243,8 +246,9 @@ function updateData(startInterval=false) {
.then(response => response.json())
.then(data => {
console.log(data);
const coords = [data.lon, data.lat];
vanFeature.getGeometry().setCoordinates(coords);
const van_data = data.find(i => i.name == 'satoshithevan');
const van_coords = [van_data.lon, van_data.lat];
vanFeature.getGeometry().setCoordinates(van_coords);
// let zoomLevel;
// if (!followedZoomed) {
@@ -267,3 +271,6 @@ function updateData(startInterval=false) {
}
updateData(true);
}
main();
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "ol-vite",
"version": "1.2.0",
"version": "1.5.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ol-vite",
"version": "1.2.0",
"version": "1.5.0",
"dependencies": {
"ol": "latest"
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "map",
"version": "1.2.0",
"version": "1.5.0",
"scripts": {
"start": "vite",
"build": "vite build",