Optional point symbols ​
Point symbols use the same TacticalDraw render, draw, edit, pick, and mixed selection lifecycle as control measures. The milsymbol renderer remains an opt-in package and is never imported by @orbat-mapper/tactical-draw.
pnpm add @orbat-mapper/point-symbols milsymbolimport { TacticalDraw } from "@orbat-mapper/tactical-draw";
import { milsymbolPointSymbols } from "@orbat-mapper/point-symbols";
const pointSymbols = milsymbolPointSymbols({ maxCacheEntries: 1024 });
const td = new TacticalDraw(adapter, { pointSymbols });
const unit = {
id: "unit-1",
kind: "point-symbol" as const,
sidc: "130315003611010300000000000000",
position: [10.75, 59.91],
rotation: 0,
size: { value: 32, unit: "pixels" as const },
};
td.render([unit, controlMeasure]);
await td.editMany([unit, controlMeasure]);Pixel sizes remain constant on screen. Meter sizes are converted through the adapter resolution and retain their persisted unit through individual and group transforms. Rotation is clockwise radians from geographic north.
Milsymbol's getAnchor() is the geographic placement point, including the staff endpoint for headquarters symbols. Individual rotation and scaling keep that position fixed; mixed group transforms move it around the shared pivot.
Use typed textAmplifiers, graphicModifiers, and style for normal authoring. Uncommon renderer controls can be supplied through rendererOptions.milsymbol, capability-wide milsymbolOptions, or resolveOptions(symbol). Canonical fields always take precedence.
Capability instances are host-owned and reusable. Their LRU cache shares canonical SVG resources across symbol positions, rotations, sizes, facades, and adapter layers. If the host changes milsymbol global configuration, call pointSymbols.invalidate() and render again.