mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
This is in need of some serious refactoring so that https://github.com/dcs-liberation/dcs_liberation/issues/2388 can be fixed.
16 lines
408 B
TypeScript
16 lines
408 B
TypeScript
import { ControlPoint } from "../../api/_liberationApi";
|
|
import { Icon, Point } from "leaflet";
|
|
import { Symbol } from "milsymbol";
|
|
|
|
export const iconForControlPoint = (cp: ControlPoint) => {
|
|
const symbol = new Symbol(cp.sidc, {
|
|
size: 24,
|
|
colorMode: "Dark",
|
|
});
|
|
|
|
return new Icon({
|
|
iconUrl: symbol.toDataURL(),
|
|
iconAnchor: new Point(symbol.getAnchor().x, symbol.getAnchor().y),
|
|
});
|
|
};
|