feat: containerize
This commit is contained in:
parent
83bb72faac
commit
82a78da81b
10 changed files with 319 additions and 55 deletions
|
|
@ -3,7 +3,6 @@
|
|||
import L from "leaflet";
|
||||
import { theme } from "./stores.js";
|
||||
import {
|
||||
STEP_SECONDS,
|
||||
defaultDispatch,
|
||||
samplePathResponse,
|
||||
fallbackBounds,
|
||||
|
|
@ -20,6 +19,8 @@
|
|||
let palette = [];
|
||||
let lightTiles, darkTiles;
|
||||
|
||||
let STEP_SECONDS = 1;
|
||||
|
||||
function updatePalette() {
|
||||
if (typeof document === "undefined") return;
|
||||
const style = getComputedStyle(document.documentElement);
|
||||
|
|
@ -197,7 +198,7 @@
|
|||
fitMapToBounds();
|
||||
refreshMap();
|
||||
loadRestrictedAreas();
|
||||
loadServicePoints();
|
||||
// loadServicePoints();
|
||||
return () => map?.remove();
|
||||
});
|
||||
|
||||
|
|
@ -346,31 +347,31 @@
|
|||
currentPositions.forEach((drone, idx) => {
|
||||
const color = colorFor(idx, palette);
|
||||
|
||||
// Draw Full Trajectory (Dimmed)
|
||||
if (drone.path.length > 1) {
|
||||
L.polyline(
|
||||
drone.path.map((p) => [p.lat, p.lng]),
|
||||
{
|
||||
color: color,
|
||||
weight: 2,
|
||||
opacity: 0.2,
|
||||
dashArray: "4, 8", // Dashed line for future path
|
||||
},
|
||||
).addTo(pathLayer);
|
||||
}
|
||||
|
||||
// Draw Visited Trajectory (Bright)
|
||||
if (drone.visited.length > 1) {
|
||||
L.polyline(
|
||||
drone.visited.map((p) => [p.lat, p.lng]),
|
||||
{
|
||||
color: color,
|
||||
weight: 3,
|
||||
opacity: 0.9,
|
||||
className: "neon-path", // Can add glow via CSS if desired
|
||||
},
|
||||
).addTo(pathLayer);
|
||||
}
|
||||
// // Draw Full Trajectory (Dimmed)
|
||||
// if (drone.path.length > 1) {
|
||||
// L.polyline(
|
||||
// drone.path.map((p) => [p.lat, p.lng]),
|
||||
// {
|
||||
// color: color,
|
||||
// weight: 2,
|
||||
// opacity: 0.2,
|
||||
// dashArray: "4, 8", // Dashed line for future path
|
||||
// },
|
||||
// ).addTo(pathLayer);
|
||||
// }
|
||||
//
|
||||
// // Draw Visited Trajectory (Bright)
|
||||
// if (drone.visited.length > 1) {
|
||||
// L.polyline(
|
||||
// drone.visited.map((p) => [p.lat, p.lng]),
|
||||
// {
|
||||
// color: color,
|
||||
// weight: 3,
|
||||
// opacity: 0.9,
|
||||
// className: "neon-path", // Can add glow via CSS if desired
|
||||
// },
|
||||
// ).addTo(pathLayer);
|
||||
// }
|
||||
|
||||
// Draw Drone Marker
|
||||
if (drone.current) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue