diff --git a/public/model/map/layer_operations.ts b/public/model/map/layer_operations.ts index 7c3cfd99..3a69432d 100644 --- a/public/model/map/layer_operations.ts +++ b/public/model/map/layer_operations.ts @@ -48,16 +48,19 @@ export const updateLayerVisibility = (map: Maplibre, layerId: string, visibility }); }; -export interface LineLayerSpecification { +export interface Layer { sourceId: string; - visibility: string; - color: string; opacity: number; - width: number; minZoom: number; maxZoom: number; } +export interface LineLayerSpecification extends Layer { + visibility: string; + color: string; + width: number; +} + export const addLineLayer = ( map: Maplibre, specification: LineLayerSpecification, @@ -90,16 +93,12 @@ export const updateLineLayer = ( return lineLayerId; }; -export interface CircleLayerSpecification { - sourceId: string; +export interface CircleLayerSpecification extends Layer { visibility: string; fillColor: string; outlineColor: string; radius: number; - opacity: number; width: number; - minZoom: number; - maxZoom: number; } export const addCircleLayer = ( @@ -137,15 +136,11 @@ export const updateCircleLayer = ( return circleLayerId; }; -export interface PolygonLayerSpecification { - sourceId: string; +export interface PolygonLayerSpecification extends Layer { visibility: string; fillColor: string; outlineColor: string; - opacity: number; width: number; - minZoom: number; - maxZoom: number; } export const addPolygonLayer = (