refactor: easy polylabel algorithm to view polygon label
This commit is contained in:
@@ -8,4 +8,5 @@ export const RASTER_BASE_LAYER_ID = "raster-base-layer";
|
||||
export const RASTER_BASE_INSERT_BEFORE_LAYER_ID = "graticules-line";
|
||||
|
||||
export const PATH_ARROW_SOURCE_ID = "path-arrow-shapes";
|
||||
export const POLYGON_LABEL_SOURCE_ID = "polygon-labels";
|
||||
export const FEATURE_STATE_SOURCE_IDS = ["countries", "places", PATH_ARROW_SOURCE_ID] as const;
|
||||
|
||||
@@ -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),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user