95 lines
1.9 KiB
HTML
95 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="da">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>Vehicle stream demo</title>
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
|
|
|
<style>
|
|
html, body {
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
#map {
|
|
height: 100%;
|
|
}
|
|
|
|
.hud {
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 10px;
|
|
z-index: 1000;
|
|
background: rgba(255,255,255,0.95);
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
border: 1px solid #ccc;
|
|
font: 13px/1.35 system-ui, sans-serif;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
|
}
|
|
|
|
.hud button {
|
|
margin-right: 8px;
|
|
padding: 6px 10px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.hud .status {
|
|
margin-top: 8px;
|
|
white-space: pre-line;
|
|
}
|
|
|
|
.hud .alerts {
|
|
margin-top: 8px;
|
|
display: grid;
|
|
gap: 6px;
|
|
max-width: 320px;
|
|
}
|
|
|
|
.alert-item {
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid #e0b100;
|
|
background: rgba(255,248,204,0.96);
|
|
color: #5f4b00;
|
|
font: 12px/1.35 system-ui,sans-serif;
|
|
}
|
|
|
|
.alert-item strong { display:block; margin-bottom:2px; }
|
|
|
|
.car {
|
|
width: 24px;
|
|
height: 24px;
|
|
transform-origin: 12px 12px;
|
|
will-change: transform;
|
|
filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
|
|
}
|
|
|
|
.car svg {
|
|
display: block;
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="map"></div>
|
|
|
|
<div class="hud">
|
|
<div>
|
|
<button id="playBtn">Play</button>
|
|
<button id="pauseBtn">Pause</button>
|
|
<button id="resetBtn">Reset</button>
|
|
</div>
|
|
<div class="status" id="status"></div>
|
|
<div class="alerts" id="presenceAlerts"></div>
|
|
</div>
|
|
|
|
<script src="data.js"></script>
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|