ADSB fixes
This commit is contained in:
@@ -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],
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user