layer instead of markers for routing controls

This commit is contained in:
vcoppe
2026-02-14 14:35:35 +01:00
parent 1137e851ce
commit 88abd72a41
8 changed files with 824 additions and 590 deletions

View File

@@ -197,9 +197,9 @@ export function getElevation(
);
}
export function loadSVGIcon(map: maplibregl.Map, id: string, svg: string) {
export function loadSVGIcon(map: maplibregl.Map, id: string, svg: string, size: number = 100) {
if (!map.hasImage(id)) {
let icon = new Image(100, 100);
let icon = new Image(size, size);
icon.onload = () => {
if (!map.hasImage(id)) {
map.addImage(id, icon);