mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
20 lines
577 B
TypeScript
20 lines
577 B
TypeScript
import { DivIcon, LatLng } from "leaflet";
|
|
import { CustomMarker } from "./custommarker";
|
|
|
|
export class DrawingCursor extends CustomMarker {
|
|
constructor() {
|
|
super(new LatLng(0, 0), {interactive: false})
|
|
this.setZIndexOffset(9999);
|
|
}
|
|
|
|
createIcon() {
|
|
this.setIcon(new DivIcon({
|
|
iconSize: [24, 24],
|
|
iconAnchor: [0, 24],
|
|
className: "leaflet-draw-marker",
|
|
}));
|
|
var el = document.createElement("div");
|
|
el.classList.add("ol-draw-icon");
|
|
this.getElement()?.appendChild(el);
|
|
}
|
|
} |