WING-GIS 해양경찰 통합 GIS 위치정보시스템. 모노레포: frontend(React 19 + MapLibre + deck.gl) + services(Spring Boot + Gradle). - npm + Nexus 프록시 레지스트리 설정 - 팀 워크플로우 v1.6.1 부트스트랩 파일 배치 - .githooks (commit-msg, post-checkout) - custom_pre_commit: true (모노레포 pre-commit 별도 관리) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.9 KiB
TypeScript
45 lines
1.9 KiB
TypeScript
import { VESSEL_COLORS, VESSEL_SHAPES, type VesselSource } from '../types/vessel';
|
|
|
|
/**
|
|
* 물표 소스별 SVG 아이콘 생성 (KHOA 스타일)
|
|
* AIS/V-Pass/E-NAV = 삼각형, VTS = 사각형, VTS-RADAR = 다이아몬드, AIR-AIS = 비행기
|
|
*/
|
|
export function createVesselSvg(source: VesselSource, size = 14): string {
|
|
const color = VESSEL_COLORS[source] || '#666';
|
|
const shape = VESSEL_SHAPES[source] || 'triangle';
|
|
|
|
switch (shape) {
|
|
case 'triangle':
|
|
return `<svg width="${size}" height="${size + 4}" viewBox="0 0 14 18">
|
|
<path d="M7 0L12 14L7 11L2 14Z" fill="${color}" stroke="#fff" stroke-width="0.8"/>
|
|
</svg>`;
|
|
case 'square':
|
|
return `<svg width="${size}" height="${size}" viewBox="0 0 14 14">
|
|
<rect x="1" y="1" width="12" height="12" fill="rgba(255,255,255,0.5)" stroke="${color}" stroke-width="2" rx="1"/>
|
|
</svg>`;
|
|
case 'diamond':
|
|
return `<svg width="${size}" height="${size}" viewBox="0 0 14 14">
|
|
<rect x="2" y="2" width="10" height="10" fill="rgba(255,255,255,0.5)" stroke="${color}" stroke-width="2" transform="rotate(45 7 7)"/>
|
|
</svg>`;
|
|
case 'plane':
|
|
return `<svg width="${size + 2}" height="${size + 2}" viewBox="0 0 16 16">
|
|
<text x="8" y="13" text-anchor="middle" font-size="14" fill="${color}">✈</text>
|
|
</svg>`;
|
|
default:
|
|
return `<svg width="${size}" height="${size}" viewBox="0 0 14 14">
|
|
<circle cx="7" cy="7" r="5" fill="rgba(255,255,255,0.5)" stroke="${color}" stroke-width="2"/>
|
|
</svg>`;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* VHF-DSC 조난 전용 깜빡이 SVG
|
|
*/
|
|
export function createDistressSvg(size = 14): string {
|
|
return `<svg width="${size}" height="${size + 4}" viewBox="0 0 14 18">
|
|
<path d="M7 0L12 14L7 11L2 14Z" fill="#d63030" stroke="#fff" stroke-width="0.8">
|
|
<animate attributeName="opacity" values="1;0.25;1" dur="0.7s" repeatCount="indefinite"/>
|
|
</path>
|
|
</svg>`;
|
|
}
|