import type { MapProjection } from "../geometry/mapProjection";
import type { MapMarker } from "../model/mapTypes";

export function drawStations(ctx: CanvasRenderingContext2D, markers: MapMarker[], projection: MapProjection) {
  ctx.save();
  for (const marker of markers) {
    const point = projection.project(marker.point);
    ctx.beginPath();
    ctx.moveTo(point.x, point.y - 6);
    ctx.lineTo(point.x + 5, point.y + 4);
    ctx.lineTo(point.x - 5, point.y + 4);
    ctx.closePath();
    ctx.fillStyle = "rgba(213, 226, 226, 0.9)";
    ctx.strokeStyle = "#08100f";
    ctx.lineWidth = 1;
    ctx.fill();
    ctx.stroke();
  }
  ctx.restore();
}

