ADSB fixes

This commit is contained in:
2026-07-06 12:17:09 -04:00
parent 8f5e8edd2e
commit 1494b43ed5
2 changed files with 2 additions and 6 deletions

View File

@@ -107,7 +107,7 @@ export class AirTrafficLayer {
f.setStyle(new Style({ f.setStyle(new Style({
image: new Icon({ image: new Icon({
src: `data:image/svg+xml,${encodeURIComponent(plane.icon)}`, src: `data:image/svg+xml,${encodeURIComponent(plane.icon)}`,
scale: 1, scale: 1.25,
rotation: (plane.heading ?? 0) * (Math.PI / 180), rotation: (plane.heading ?? 0) * (Math.PI / 180),
anchor: [0.5, 0.5], anchor: [0.5, 0.5],
}), }),

View File

@@ -361,11 +361,7 @@ export async function getADSBImage(icao) {
).then(resp => resp.ok ? resp.json() : null); ).then(resp => resp.ok ? resp.json() : null);
let src; let src;
console.log(specific); if(specific?.photos?.[0]) src = specific.photos[0].thumbnail_large?.src || specific.photos[0].thumbnail?.src;
if(specific?.photos?.[0]) {
console.log(`Found ${icao}`);
src = specific.photos[0].thumbnail_large?.src || specific.photos[0].thumbnail?.src;
}
else src = await generic; else src = await generic;
if(!src) return null; if(!src) return null;