refactor: easy polylabel algorithm to view polygon label

This commit is contained in:
taDuc
2026-05-12 18:43:12 +07:00
parent 7b1f7538ab
commit 51f432f0fe
6 changed files with 258 additions and 7 deletions
+7
View File
@@ -29,6 +29,7 @@ import { getCastleLayers } from "./castle";
import { getRuinLayers } from "./ruin";
import { getPortLayers } from "./port";
import { getBridgeLayers } from "./bridge";
import { getPolygonLabelLayers } from "./polygonLabels";
import { LayerSpecification } from "maplibre-gl";
@@ -63,3 +64,9 @@ export function getAllGeotypeLayers(sourceId: string, pathArrowSourceId?: string
...getBridgeLayers(sourceId, pathArrowSourceId, pointSourceId)
];
}
export function getAllGeotypeLabelLayers(polygonLabelSourceId: string): LayerSpecification[] {
return [
...getPolygonLabelLayers(polygonLabelSourceId),
];
}