vue3-maplibre-gl
Version:
Vue 3 components and composables for MapLibre GL JS - Build interactive maps with ease
87 lines (86 loc) • 4.33 kB
TypeScript
import { CreateLayerActions, LineLayerStyle } from '../types';
import { Map, MapLayerMouseEvent, MapLayerTouchEvent, FilterSpecification, LineLayerSpecification } from 'maplibre-gl';
/**
* Props interface for LineLayer component
* Defines all configurable properties for a MapLibre GL Line Layer
*/
interface LayerProps {
/** Unique identifier for the layer */
id: string;
/** Filter expression to apply to the layer */
filter: FilterSpecification;
/** Style configuration for the line layer */
style: LineLayerStyle;
/** Maximum zoom level for layer visibility */
maxzoom: number;
/** Minimum zoom level for layer visibility */
minzoom: number;
/** Arbitrary metadata for the layer */
metadata: object;
/** Data source for the layer */
source: string | object;
/** Source layer name for vector sources */
sourceLayer: string;
/** ID of layer before which to insert this layer */
beforeId: string;
/** Whether the layer is visible */
visible: boolean;
/** Callback function to register layer actions */
register: (actions: CreateLayerActions<LineLayerSpecification>, map: Map) => void;
}
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
visible: boolean;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
touchcancel: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
touchend: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
touchstart: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
click: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
contextmenu: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
dblclick: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mousemove: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mouseup: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mousedown: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mouseout: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mouseover: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mouseenter: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
mouseleave: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
register: (actions: CreateLayerActions<LineLayerSpecification>, map: Map) => void;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
visible: boolean;
}>>> & Readonly<{
onTouchcancel?: ((ev: MapLayerTouchEvent) => any) | undefined;
onTouchend?: ((ev: MapLayerTouchEvent) => any) | undefined;
onTouchstart?: ((ev: MapLayerTouchEvent) => any) | undefined;
onClick?: ((ev: MapLayerMouseEvent) => any) | undefined;
onContextmenu?: ((ev: MapLayerMouseEvent) => any) | undefined;
onDblclick?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMousemove?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMouseup?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMousedown?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMouseout?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMouseover?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMouseenter?: ((ev: MapLayerMouseEvent) => any) | undefined;
onMouseleave?: ((ev: MapLayerMouseEvent) => any) | undefined;
onRegister?: ((actions: CreateLayerActions<LineLayerSpecification>, map: Map) => any) | undefined;
}>, {
visible: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
//# sourceMappingURL=LineLayer.vue.d.ts.map