This commit is contained in:
parent
2723984e0e
commit
74efbeb46b
|
|
@ -20,7 +20,7 @@ export async function getFlightsApi(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
console.log(result);
|
// console.log(result);
|
||||||
return result;
|
return result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to fetch aircraft data:", error);
|
console.error("Failed to fetch aircraft data:", error);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export function MapBounds({ setBoundries }) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleMoveEnd = () => {
|
const handleMoveEnd = () => {
|
||||||
const bounds = map.getBounds();
|
const bounds = map.getBounds();
|
||||||
console.log("Map Bounds:", bounds);
|
// console.log("Map Bounds:", bounds);
|
||||||
|
|
||||||
const southWest = bounds.getSouthWest();
|
const southWest = bounds.getSouthWest();
|
||||||
const northEast = bounds.getNorthEast();
|
const northEast = bounds.getNorthEast();
|
||||||
|
|
@ -20,7 +20,7 @@ export function MapBounds({ setBoundries }) {
|
||||||
northEast,
|
northEast,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
setBoundries(data);
|
setBoundries(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ if (typeof window !== "undefined") {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCategoryIcon = (category, heading = 0, size = [25, 25]) => {
|
const getCategoryIcon = (category, heading = 0, size = [25, 25]) => {
|
||||||
console.log(category);
|
|
||||||
const iconUrl = `/icons/${category?.toLowerCase() || "default"}.svg`;
|
const iconUrl = `/icons/${category?.toLowerCase() || "default"}.svg`;
|
||||||
|
|
||||||
// Create a rotated divIcon wrapper for the image
|
// Create a rotated divIcon wrapper for the image
|
||||||
|
|
@ -34,7 +33,13 @@ const getCategoryIcon = (category, heading = 0, size = [25, 25]) => {
|
||||||
height: ${size[1]}px;
|
height: ${size[1]}px;
|
||||||
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
|
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
|
||||||
">
|
">
|
||||||
<img src="${iconUrl}" style="width: 100%; height: 100%;" />
|
<img
|
||||||
|
src="${iconUrl}"
|
||||||
|
style="width: 100%; height: 100%;
|
||||||
|
filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(7495%) hue-rotate(356deg) brightness(91%) contrast(118%);
|
||||||
|
"
|
||||||
|
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
@ -184,7 +189,6 @@ const MapView = () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
socketRef.current.on("flightsData", (data) => {
|
socketRef.current.on("flightsData", (data) => {
|
||||||
console.log(data);
|
|
||||||
setFlights(data.ac || []);
|
setFlights(data.ac || []);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user