auto-sync: 2026-04-19 16:40:01
This commit is contained in:
@@ -62,16 +62,11 @@ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 18,
|
||||
}).addTo(map);
|
||||
|
||||
// plane SVG icon, rotated by heading
|
||||
// plane icon rotated by heading
|
||||
function planeIcon(heading) {
|
||||
const deg = heading || 0;
|
||||
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
style="transform:rotate(${deg}deg);transform-origin:center">
|
||||
<path fill="#58a6ff" stroke="#0d1117" stroke-width="0.5"
|
||||
d="M12 2 L15 9 L22 10 L17 15 L18.5 22 L12 19 L5.5 22 L7 15 L2 10 L9 9 Z"/>
|
||||
</svg>`;
|
||||
return L.divIcon({
|
||||
html: svg,
|
||||
html: `<div style="font-size:20px;transform:rotate(${deg}deg);transform-origin:center;line-height:1;">✈</div>`,
|
||||
className: '',
|
||||
iconSize: [24, 24],
|
||||
iconAnchor: [12, 12],
|
||||
@@ -103,7 +98,7 @@ function closePopup() {
|
||||
|
||||
async function refresh() {
|
||||
try {
|
||||
const res = await fetch('/api/aircraft/live?minutes=10');
|
||||
const res = await fetch('/api/aircraft/live?minutes=60');
|
||||
if (!res.ok) throw new Error('HTTP ' + res.status);
|
||||
const geojson = await res.json();
|
||||
const features = geojson.features || [];
|
||||
|
||||
Reference in New Issue
Block a user