mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
21 lines
665 B
TypeScript
21 lines
665 B
TypeScript
import { DivIcon, LatLngExpression, MarkerOptions } from "leaflet";
|
|
import { CustomMarker } from "./custommarker";
|
|
|
|
export class DestinationPreviewMarker extends CustomMarker {
|
|
constructor(latlng: LatLngExpression, options?: MarkerOptions) {
|
|
super(latlng, options);
|
|
this.setZIndexOffset(9999);
|
|
}
|
|
|
|
createIcon() {
|
|
this.setIcon(new DivIcon({
|
|
iconSize: [52, 52],
|
|
iconAnchor: [26, 26],
|
|
className: "leaflet-destination-preview",
|
|
}));
|
|
var el = document.createElement("div");
|
|
el.classList.add("ol-destination-preview-icon");
|
|
this.getElement()?.appendChild(el);
|
|
}
|
|
}
|