vue3-maplibre-gl
Version:
Vue 3 components and composables for MapLibre GL JS - Build interactive maps with ease
39 lines (38 loc) • 1.78 kB
TypeScript
import { CreateLayerActions, Nullable, FillLayerStyle } from '../../types';
import { MaybeRef } from 'vue';
import { Map, SourceSpecification, FilterSpecification, FillLayerSpecification, StyleSetterOptions } from 'maplibre-gl';
type Layer = FillLayerSpecification;
interface CreateFillLayerProps {
map: MaybeRef<Nullable<Map>>;
source: MaybeRef<string | SourceSpecification | object | null>;
id?: string;
beforeId?: string;
filter?: FilterSpecification;
style?: FillLayerStyle;
maxzoom?: number;
minzoom?: number;
metadata?: object;
sourceLayer?: string;
debug?: boolean;
register?: (actions: CreateLayerActions<Layer>, map: Map) => void;
}
interface FillLayerActions extends CreateLayerActions<Layer> {
setStyle: (styleVal?: FillLayerStyle) => void;
setOpacity: (opacity: number, options?: StyleSetterOptions) => void;
setColor: (color: string, options?: StyleSetterOptions) => void;
setOutlineColor: (color: string, options?: StyleSetterOptions) => void;
setPattern: (pattern: string, options?: StyleSetterOptions) => void;
setAntialias: (antialias: boolean, options?: StyleSetterOptions) => void;
setVisibility: (visibility: 'visible' | 'none', options?: StyleSetterOptions) => void;
setSortKey: (sortKey: number, options?: StyleSetterOptions) => void;
}
/**
* Composable for creating and managing MapLibre GL Fill Layers
* Provides reactive fill layer with error handling, performance optimizations, and enhanced API
*
* @param props - Configuration options for the fill layer
* @returns Enhanced actions and state for the fill layer
*/
export declare function useCreateFillLayer(props: CreateFillLayerProps): FillLayerActions;
export {};
//# sourceMappingURL=useCreateFillLayer.d.ts.map