From 721679fe5e29bb9f2bd9518f573fdacd073bb5f5 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 26 Jul 2026 19:29:06 +0900 Subject: [PATCH] auto: 2026-07-26 19:29 (ESD_LAPTOP) --- .../B04_wf1_Surface_UI_MapViewer.ts | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts b/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts index f0d9290d..2b8c3bbc 100644 --- a/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts +++ b/B04_wf1_Surface/B04_wf1_Surface_UI_MapViewer.ts @@ -308,6 +308,7 @@ export function createSurfaceMapViewer(): SurfaceMapViewer { coordinates: unknown, width: number, height: number, + marker: "dot" | "x" = "dot", ): void { if ( !Array.isArray(coordinates) || @@ -317,6 +318,20 @@ export function createSurfaceMapViewer(): SurfaceMapViewer { return; } const [x, y] = toCanvasPoint(coordinates[0], coordinates[1], width, height); + if (marker === "x") { + // 표고점: 조금 굵고 큰 X 마커 + const arm = 4; + const prevWidth = context.lineWidth; + context.lineWidth = 2; + context.beginPath(); + context.moveTo(x - arm, y - arm); + context.lineTo(x + arm, y + arm); + context.moveTo(x - arm, y + arm); + context.lineTo(x + arm, y - arm); + context.stroke(); + context.lineWidth = prevWidth; + return; + } context.beginPath(); context.arc(x, y, 2, 0, Math.PI * 2); context.fillStyle = context.strokeStyle; @@ -374,13 +389,14 @@ export function createSurfaceMapViewer(): SurfaceMapViewer { geometry: GeoJsonGeometry, width: number, height: number, + marker: "dot" | "x" = "dot", ): void { const coordinates = geometry.coordinates; if (!Array.isArray(coordinates)) return; if (geometry.type === "Point") { - drawPoint(context, coordinates, width, height); + drawPoint(context, coordinates, width, height, marker); } else if (geometry.type === "MultiPoint") { - coordinates.forEach((point) => drawPoint(context, point, width, height)); + coordinates.forEach((point) => drawPoint(context, point, width, height, marker)); } else if (geometry.type === "LineString") { drawRing(context, coordinates, width, height, false); } else if (geometry.type === "MultiLineString") { @@ -429,8 +445,9 @@ export function createSurfaceMapViewer(): SurfaceMapViewer { if (!activeGisLayers.has(layer)) return; context.lineWidth = isContour(layer) ? 0.7 : 1.5; context.strokeStyle = GIS_LAYER_COLORS[layer]; + const marker = layer === "도엽_표고점" ? "x" : "dot"; geoJsonLayers.get(layer)?.features?.forEach((feature) => { - if (feature.geometry) drawGeometry(context, feature.geometry, width, height); + if (feature.geometry) drawGeometry(context, feature.geometry, width, height, marker); }); }); if (showContourLabels) drawContourLabels(context, width, height);