ADSB fixes
This commit is contained in:
@@ -107,7 +107,7 @@ export class AirTrafficLayer {
|
||||
f.setStyle(new Style({
|
||||
image: new Icon({
|
||||
src: `data:image/svg+xml,${encodeURIComponent(plane.icon)}`,
|
||||
scale: 1,
|
||||
scale: 1.25,
|
||||
rotation: (plane.heading ?? 0) * (Math.PI / 180),
|
||||
anchor: [0.5, 0.5],
|
||||
}),
|
||||
|
||||
@@ -361,11 +361,7 @@ export async function getADSBImage(icao) {
|
||||
).then(resp => resp.ok ? resp.json() : null);
|
||||
|
||||
let src;
|
||||
console.log(specific);
|
||||
if(specific?.photos?.[0]) {
|
||||
console.log(`Found ${icao}`);
|
||||
src = specific.photos[0].thumbnail_large?.src || specific.photos[0].thumbnail?.src;
|
||||
}
|
||||
if(specific?.photos?.[0]) src = specific.photos[0].thumbnail_large?.src || specific.photos[0].thumbnail?.src;
|
||||
else src = await generic;
|
||||
|
||||
if(!src) return null;
|
||||
|
||||
Reference in New Issue
Block a user