@geoql/v-maplibre 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -16
- package/dist/controls/_shared/index.d.ts +1 -0
- package/dist/controls/_shared/useMapControl.d.ts +10 -0
- package/dist/controls/index.d.ts +6 -0
- package/dist/controls/layer/VControlLayer.vue.d.ts +38 -0
- package/dist/controls/layer/VControlLayerGroup.vue.d.ts +53 -0
- package/dist/controls/layer/events.d.ts +1 -0
- package/dist/controls/layer/index.d.ts +5 -0
- package/dist/controls/layer/types.d.ts +16 -0
- package/dist/controls/legend/VControlLegend.vue.d.ts +54 -0
- package/dist/controls/legend/events.d.ts +2 -0
- package/dist/controls/legend/index.d.ts +3 -0
- package/dist/controls/legend/types.d.ts +63 -0
- package/dist/decoder-CLokFc0V.js +9 -0
- package/dist/decoder-CLokFc0V.js.map +1 -0
- package/dist/deflate-yeu3ogBn.js +11 -0
- package/dist/deflate-yeu3ogBn.js.map +1 -0
- package/dist/geotiff-BUZniE5g.js +3106 -0
- package/dist/geotiff-BUZniE5g.js.map +1 -0
- package/dist/index-Bt_rREAc.js +168 -0
- package/dist/index-Bt_rREAc.js.map +1 -0
- package/dist/index-CA8I5Z2-.js +4667 -0
- package/dist/index-CA8I5Z2-.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3122 -1230
- package/dist/index.js.map +1 -1
- package/dist/jpeg-B7yImnpY.js +534 -0
- package/dist/jpeg-B7yImnpY.js.map +1 -0
- package/dist/layers/deckgl/_shared/useDeckOverlay.d.ts +2 -0
- package/dist/layers/deckgl/index.d.ts +4 -0
- package/dist/layers/deckgl/mosaic/VLayerDeckglMosaic.vue.d.ts +163 -0
- package/dist/layers/deckgl/mosaic/index.d.ts +2 -0
- package/dist/layers/deckgl/text/VLayerDeckglText.vue.d.ts +19 -2
- package/dist/layers/deckgl/wind-particle/VLayerDeckglWindParticle.vue.d.ts +120 -0
- package/dist/layers/deckgl/wind-particle/index.d.ts +3 -0
- package/dist/layers/index.d.ts +3 -2
- package/dist/layers/maplibre/canvas/VLayerMaplibreCanvas.vue.d.ts +1 -1
- package/dist/layers/maplibre/custom/isochrone/VLayerMaplibreIsochrone.vue.d.ts +71 -0
- package/dist/layers/maplibre/custom/isochrone/index.d.ts +1 -0
- package/dist/layers/maplibre/geojson/VLayerMaplibreGeojson.vue.d.ts +1 -1
- package/dist/layers/maplibre/image/VLayerMaplibreImage.vue.d.ts +1 -1
- package/dist/layers/maplibre/pmtile/VLayerMaplibrePmtile.vue.d.ts +1 -1
- package/dist/layers/maplibre/video/VLayerMaplibreVideo.vue.d.ts +1 -1
- package/dist/lerc-CqgA9njy.js +1032 -0
- package/dist/lerc-CqgA9njy.js.map +1 -0
- package/dist/lzw-DL9RcHOz.js +85 -0
- package/dist/lzw-DL9RcHOz.js.map +1 -0
- package/dist/markers/VMarker.vue.d.ts +1 -2
- package/dist/packbits-YEJGULcy.js +25 -0
- package/dist/packbits-YEJGULcy.js.map +1 -0
- package/dist/pako.esm-Bx5X36Wo.js +1075 -0
- package/dist/pako.esm-Bx5X36Wo.js.map +1 -0
- package/dist/popups/VPopup.vue.d.ts +1 -1
- package/dist/raw-CoQHiEnn.js +10 -0
- package/dist/raw-CoQHiEnn.js.map +1 -0
- package/dist/v-maplibre.css +1 -1
- package/dist/webimage-BXLN-zu8.js +20 -0
- package/dist/webimage-BXLN-zu8.js.map +1 -0
- package/package.json +104 -80
- package/dist/layers/maplibre/{cluster → custom/cluster}/VLayerMaplibreCluster.vue.d.ts +1 -1
- package/dist/layers/maplibre/{cluster → custom/cluster}/index.d.ts +0 -0
- package/dist/layers/maplibre/{route → custom/route}/VLayerMaplibreRoute.vue.d.ts +2 -2
- /package/dist/layers/maplibre/{route → custom/route}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -17,38 +17,43 @@
|
|
|
17
17
|
- 🚀 **Nuxt 4 Ready** - Seamlessly works with Nuxt 4 and SSR
|
|
18
18
|
- 🎯 **PMTiles Built-in** - Native support for PMTiles protocol
|
|
19
19
|
- 🌐 **deck.gl Integration** - High-performance WebGL visualization layers
|
|
20
|
+
- 🛰️ **COG/GeoTIFF Support** - GPU-accelerated Cloud-Optimized GeoTIFF layers
|
|
21
|
+
- 📡 **LiDAR Viewer** - LAS/LAZ/COPC point cloud visualization with streaming
|
|
20
22
|
|
|
21
23
|
## Installation
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
26
|
# bun
|
|
25
|
-
bun add @geoql/v-maplibre maplibre-gl
|
|
27
|
+
bun add @geoql/v-maplibre maplibre-gl @deck.gl/{core,layers,mapbox,aggregation-layers,geo-layers,mesh-layers} maplibre-gl-wind
|
|
26
28
|
|
|
27
29
|
# npm
|
|
28
|
-
npm install @geoql/v-maplibre maplibre-gl
|
|
30
|
+
npm install @geoql/v-maplibre maplibre-gl @deck.gl/{core,layers,mapbox,aggregation-layers,geo-layers,mesh-layers} maplibre-gl-wind
|
|
29
31
|
|
|
30
32
|
# yarn
|
|
31
|
-
yarn add @geoql/v-maplibre maplibre-gl
|
|
33
|
+
yarn add @geoql/v-maplibre maplibre-gl @deck.gl/{core,layers,mapbox,aggregation-layers,geo-layers,mesh-layers} maplibre-gl-wind
|
|
32
34
|
|
|
33
35
|
# pnpm
|
|
34
|
-
pnpm add @geoql/v-maplibre maplibre-gl
|
|
36
|
+
pnpm add @geoql/v-maplibre maplibre-gl @deck.gl/{core,layers,mapbox,aggregation-layers,geo-layers,mesh-layers} maplibre-gl-wind
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
> **Note:** All packages listed above are required peer dependencies. Without them, your build will fail with missing export errors.
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
### Additional Optional Dependencies
|
|
42
|
+
|
|
43
|
+
Install these packages based on the features you need:
|
|
40
44
|
|
|
41
45
|
```bash
|
|
42
|
-
#
|
|
43
|
-
bun add @deck.gl
|
|
46
|
+
# Raster/COG layers (Cloud-Optimized GeoTIFF)
|
|
47
|
+
bun add @developmentseed/deck.gl-raster @developmentseed/deck.gl-geotiff geotiff
|
|
48
|
+
|
|
49
|
+
# COG Mosaic layers (client-side mosaicking of multiple COGs)
|
|
50
|
+
bun add @developmentseed/deck.gl-raster @developmentseed/deck.gl-geotiff geotiff proj4
|
|
44
51
|
|
|
45
|
-
#
|
|
46
|
-
bun add
|
|
47
|
-
bun add @deck.gl/geo-layers # Trips, MVT, Tile, H3
|
|
48
|
-
bun add @deck.gl/mesh-layers # SimpleMesh, Scenegraph
|
|
52
|
+
# LiDAR viewer control
|
|
53
|
+
bun add maplibre-gl-lidar
|
|
49
54
|
|
|
50
|
-
#
|
|
51
|
-
bun add
|
|
55
|
+
# Wind particle visualization
|
|
56
|
+
bun add maplibre-gl-wind
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
## Quick Start
|
|
@@ -91,6 +96,7 @@ bun add @developmentseed/deck.gl-geotiff
|
|
|
91
96
|
- **`VLayerMaplibreCanvas`** - Canvas layers
|
|
92
97
|
- **`VLayerMaplibreCluster`** - Clustered point layers
|
|
93
98
|
- **`VLayerMaplibrePmtile`** - PMTiles layers
|
|
99
|
+
- **`VLayerMaplibreRoute`** - Route/delivery tracking visualization
|
|
94
100
|
|
|
95
101
|
### deck.gl Layer Components
|
|
96
102
|
|
|
@@ -125,16 +131,39 @@ High-performance WebGL visualization layers powered by deck.gl:
|
|
|
125
131
|
- `VLayerDeckglTile3D` - 3D Tiles (Cesium)
|
|
126
132
|
- `VLayerDeckglTerrain` - Terrain mesh
|
|
127
133
|
- `VLayerDeckglH3Hexagon` - H3 hexagons
|
|
134
|
+
- `VLayerDeckglH3Cluster` - Clustered H3 hexagon regions
|
|
128
135
|
- `VLayerDeckglGreatCircle` - Great circle arcs
|
|
136
|
+
- `VLayerDeckglWMS` - Web Map Service tiles
|
|
137
|
+
|
|
138
|
+
**Tile System Layers**
|
|
139
|
+
|
|
140
|
+
- `VLayerDeckglS2` - Google S2 geometry cells
|
|
141
|
+
- `VLayerDeckglGeohash` - Geohash spatial indexing
|
|
142
|
+
- `VLayerDeckglQuadkey` - Bing Maps Quadkey tiles
|
|
143
|
+
- `VLayerDeckglGridCell` - Pre-aggregated grid cells
|
|
129
144
|
|
|
130
145
|
**Mesh Layers**
|
|
131
146
|
|
|
132
147
|
- `VLayerDeckglSimpleMesh` - 3D meshes
|
|
133
148
|
- `VLayerDeckglScenegraph` - glTF/GLB models
|
|
134
149
|
|
|
135
|
-
**
|
|
150
|
+
**Point Cloud Layers**
|
|
151
|
+
|
|
152
|
+
- `VLayerDeckglPointCloud` - LiDAR/photogrammetry point clouds
|
|
153
|
+
- `VLayerDeckglSolidPolygon` - 3D extruded solid polygons
|
|
154
|
+
|
|
155
|
+
**Raster Layers** (requires `@developmentseed/deck.gl-raster` and `@developmentseed/deck.gl-geotiff`)
|
|
156
|
+
|
|
157
|
+
- `VLayerDeckglCOG` - Cloud-Optimized GeoTIFF visualization (GPU-accelerated, auto-reprojection)
|
|
158
|
+
- `VLayerDeckglMosaic` - Client-side COG mosaic from STAC items (requires `flatbush`, `proj4`)
|
|
136
159
|
|
|
137
|
-
|
|
160
|
+
**Wind Visualization** (requires `maplibre-gl-wind`)
|
|
161
|
+
|
|
162
|
+
- `VLayerDeckglWindParticle` - Animated wind particle flow with speed-based color ramps
|
|
163
|
+
|
|
164
|
+
**Generic Layer**
|
|
165
|
+
|
|
166
|
+
- `VLayerDeckgl` - Use any deck.gl layer class directly
|
|
138
167
|
|
|
139
168
|
### Control Components
|
|
140
169
|
|
|
@@ -143,6 +172,7 @@ High-performance WebGL visualization layers powered by deck.gl:
|
|
|
143
172
|
- **`VControlGeolocate`** - Geolocation control
|
|
144
173
|
- **`VControlFullscreen`** - Fullscreen toggle
|
|
145
174
|
- **`VControlAttribution`** - Attribution control
|
|
175
|
+
- **`VControlLidar`** - LiDAR point cloud viewer (LAS/LAZ/COPC support, streaming, color schemes)
|
|
146
176
|
|
|
147
177
|
## deck.gl Example
|
|
148
178
|
|
|
@@ -178,6 +208,44 @@ High-performance WebGL visualization layers powered by deck.gl:
|
|
|
178
208
|
</template>
|
|
179
209
|
```
|
|
180
210
|
|
|
211
|
+
## Wind Visualization Example
|
|
212
|
+
|
|
213
|
+
```vue
|
|
214
|
+
<script setup lang="ts">
|
|
215
|
+
import { VMap, VLayerDeckglWindParticle } from '@geoql/v-maplibre';
|
|
216
|
+
|
|
217
|
+
const mapOptions = {
|
|
218
|
+
style: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
|
|
219
|
+
center: [0, 20],
|
|
220
|
+
zoom: 2,
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// Wind data points with speed (m/s) and direction (degrees, 0=North)
|
|
224
|
+
const windData = [
|
|
225
|
+
{ lat: 40.7, lon: -74.0, speed: 5.2, direction: 180 },
|
|
226
|
+
{ lat: 34.0, lon: -118.2, speed: 3.1, direction: 270 },
|
|
227
|
+
// ... more points
|
|
228
|
+
];
|
|
229
|
+
</script>
|
|
230
|
+
|
|
231
|
+
<template>
|
|
232
|
+
<VMap :options="mapOptions" style="height: 500px">
|
|
233
|
+
<VLayerDeckglWindParticle
|
|
234
|
+
id="wind"
|
|
235
|
+
:wind-data="windData"
|
|
236
|
+
:num-particles="8192"
|
|
237
|
+
:speed-factor="50"
|
|
238
|
+
:color-ramp="[
|
|
239
|
+
[0.0, [59, 130, 189, 255]],
|
|
240
|
+
[0.5, [253, 174, 97, 255]],
|
|
241
|
+
[1.0, [213, 62, 79, 255]],
|
|
242
|
+
]"
|
|
243
|
+
:speed-range="[0, 30]"
|
|
244
|
+
></VLayerDeckglWindParticle>
|
|
245
|
+
</VMap>
|
|
246
|
+
</template>
|
|
247
|
+
```
|
|
248
|
+
|
|
181
249
|
## Usage with Nuxt
|
|
182
250
|
|
|
183
251
|
For Nuxt applications, wrap the map component with `ClientOnly`:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useMapControl } from './useMapControl';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
2
|
+
import type { Map, ControlPosition } from 'maplibre-gl';
|
|
3
|
+
/**
|
|
4
|
+
* Register a Vue component as a MapLibre IControl for proper control stacking.
|
|
5
|
+
*
|
|
6
|
+
* @param map - Ref to the MapLibre map instance
|
|
7
|
+
* @param containerRef - Ref to the component's root HTMLElement
|
|
8
|
+
* @param position - Control position ('top-left' | 'top-right' | 'bottom-left' | 'bottom-right')
|
|
9
|
+
*/
|
|
10
|
+
export declare function useMapControl(map: ShallowRef<Map | null> | Ref<Map | null>, containerRef: Ref<HTMLElement | null>, position: ControlPosition): void;
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -5,3 +5,9 @@ export { NavigationControl as VControlNavigation } from './navigation';
|
|
|
5
5
|
export { ScaleControl as VControlScale } from './scale';
|
|
6
6
|
export { LidarControl as VControlLidar } from './lidar';
|
|
7
7
|
export type { LidarControlOptions, ColorScheme, CopcLoadingMode, PointCloudInfo, PointCloudBounds, StreamingProgress, LidarLoadEventData, LidarErrorEventData, LidarUnloadEventData, } from './lidar';
|
|
8
|
+
export { VControlLayer, VControlLayerGroup } from './layer';
|
|
9
|
+
export type { LayerControlOptions, LayerType, ControlPosition, LayerConfig, } from './layer';
|
|
10
|
+
export { layerControlEvents } from './layer';
|
|
11
|
+
export { VControlLegend } from './legend';
|
|
12
|
+
export type { LegendType, CategoryLegendItem, GradientLegendItem, SizeLegendItem, LegendControlOptions, FilterState, ExpressionValue, DeckLayerWithExtensions, } from './legend';
|
|
13
|
+
export { LEGEND_EVENTS } from './legend';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ControlPosition, LayerType } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layerId: string;
|
|
4
|
+
position?: ControlPosition;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
layerType?: LayerType;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_1: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"visibility-change": (visible: boolean) => any;
|
|
16
|
+
"opacity-change": (opacity: number) => any;
|
|
17
|
+
"update:visible": (visible: boolean) => any;
|
|
18
|
+
"update:opacity": (opacity: number) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onVisibility-change"?: ((visible: boolean) => any) | undefined;
|
|
21
|
+
"onOpacity-change"?: ((opacity: number) => any) | undefined;
|
|
22
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
23
|
+
"onUpdate:opacity"?: ((opacity: number) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
position: ControlPosition;
|
|
26
|
+
title: string;
|
|
27
|
+
opacity: number;
|
|
28
|
+
visible: boolean;
|
|
29
|
+
layerType: LayerType;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ControlPosition, LayerType } from './types';
|
|
2
|
+
export interface LayerConfig {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
type?: LayerType;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
layers: LayerConfig[];
|
|
11
|
+
position?: ControlPosition;
|
|
12
|
+
title?: string;
|
|
13
|
+
collapsible?: boolean;
|
|
14
|
+
collapsed?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"visibility-change": (data: {
|
|
22
|
+
layerId: string;
|
|
23
|
+
visible: boolean;
|
|
24
|
+
}) => any;
|
|
25
|
+
"opacity-change": (data: {
|
|
26
|
+
layerId: string;
|
|
27
|
+
opacity: number;
|
|
28
|
+
}) => any;
|
|
29
|
+
"update:layers": (layers: LayerConfig[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onVisibility-change"?: ((data: {
|
|
32
|
+
layerId: string;
|
|
33
|
+
visible: boolean;
|
|
34
|
+
}) => any) | undefined;
|
|
35
|
+
"onOpacity-change"?: ((data: {
|
|
36
|
+
layerId: string;
|
|
37
|
+
opacity: number;
|
|
38
|
+
}) => any) | undefined;
|
|
39
|
+
"onUpdate:layers"?: ((layers: LayerConfig[]) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
position: ControlPosition;
|
|
42
|
+
collapsed: boolean;
|
|
43
|
+
title: string;
|
|
44
|
+
collapsible: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
|
+
declare const _default: typeof __VLS_export;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const layerControlEvents: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as VControlLayer } from './VControlLayer.vue';
|
|
2
|
+
export { default as VControlLayerGroup } from './VControlLayerGroup.vue';
|
|
3
|
+
export type { LayerControlOptions, LayerType, ControlPosition } from './types';
|
|
4
|
+
export type { LayerConfig } from './VControlLayerGroup.vue';
|
|
5
|
+
export { layerControlEvents } from './events';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { ControlPosition } from 'maplibre-gl';
|
|
2
|
+
export type LayerType = 'maplibre' | 'deckgl';
|
|
3
|
+
export interface LayerControlOptions {
|
|
4
|
+
/** Layer ID to control */
|
|
5
|
+
layerId: string;
|
|
6
|
+
/** Layer type - auto-detected if not provided */
|
|
7
|
+
layerType?: LayerType;
|
|
8
|
+
/** Initial visibility state */
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/** Initial opacity (0-1) */
|
|
11
|
+
opacity?: number;
|
|
12
|
+
/** Control title text (default: 'Layer Control') */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Custom CSS class */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ControlPosition, LegendType, LegendItem, FilterState } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layerIds: string[];
|
|
4
|
+
type?: LegendType;
|
|
5
|
+
items?: LegendItem[];
|
|
6
|
+
position?: ControlPosition;
|
|
7
|
+
property?: string;
|
|
8
|
+
autoGenerate?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
interactive?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_1: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
"item-click": (data: {
|
|
19
|
+
item: LegendItem;
|
|
20
|
+
index: number;
|
|
21
|
+
visible: boolean;
|
|
22
|
+
}) => any;
|
|
23
|
+
"filter-change": (data: {
|
|
24
|
+
filter: FilterState;
|
|
25
|
+
layerIds: string[];
|
|
26
|
+
}) => any;
|
|
27
|
+
"update:filter": (filter: FilterState) => any;
|
|
28
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
"onItem-click"?: ((data: {
|
|
30
|
+
item: LegendItem;
|
|
31
|
+
index: number;
|
|
32
|
+
visible: boolean;
|
|
33
|
+
}) => any) | undefined;
|
|
34
|
+
"onFilter-change"?: ((data: {
|
|
35
|
+
filter: FilterState;
|
|
36
|
+
layerIds: string[];
|
|
37
|
+
}) => any) | undefined;
|
|
38
|
+
"onUpdate:filter"?: ((filter: FilterState) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
position: ControlPosition;
|
|
41
|
+
type: LegendType;
|
|
42
|
+
collapsed: boolean;
|
|
43
|
+
title: string;
|
|
44
|
+
autoGenerate: boolean;
|
|
45
|
+
interactive: boolean;
|
|
46
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
47
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type { ControlPosition } from 'maplibre-gl';
|
|
2
|
+
export type LegendType = 'category' | 'gradient' | 'size';
|
|
3
|
+
export type LayerType = 'maplibre' | 'deckgl';
|
|
4
|
+
export interface CategoryLegendItem {
|
|
5
|
+
value: string | number;
|
|
6
|
+
label: string;
|
|
7
|
+
color: string;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
count?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GradientLegendItem {
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
minLabel?: string;
|
|
15
|
+
maxLabel?: string;
|
|
16
|
+
colors: string[];
|
|
17
|
+
stops?: number[];
|
|
18
|
+
}
|
|
19
|
+
export interface SizeLegendItem {
|
|
20
|
+
value: number;
|
|
21
|
+
label: string;
|
|
22
|
+
size: number;
|
|
23
|
+
}
|
|
24
|
+
export type LegendItem = CategoryLegendItem | GradientLegendItem | SizeLegendItem;
|
|
25
|
+
export interface FilterState {
|
|
26
|
+
visibleValues: (string | number)[];
|
|
27
|
+
minRange?: number;
|
|
28
|
+
maxRange?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface LegendControlOptions {
|
|
31
|
+
layerIds: string[];
|
|
32
|
+
type: LegendType;
|
|
33
|
+
items?: LegendItem[];
|
|
34
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
35
|
+
property?: string;
|
|
36
|
+
autoGenerate?: boolean;
|
|
37
|
+
title?: string;
|
|
38
|
+
collapsed?: boolean;
|
|
39
|
+
interactive?: boolean;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface LegendItemClickEventData {
|
|
43
|
+
item: LegendItem;
|
|
44
|
+
index: number;
|
|
45
|
+
visible: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface LegendFilterChangeEventData {
|
|
48
|
+
filter: FilterState;
|
|
49
|
+
layerIds: string[];
|
|
50
|
+
}
|
|
51
|
+
export type ExpressionValue = string | number | boolean | ExpressionValue[];
|
|
52
|
+
export interface DeckLayerWithExtensions {
|
|
53
|
+
id: string;
|
|
54
|
+
props?: {
|
|
55
|
+
extensions?: Array<{
|
|
56
|
+
constructor?: {
|
|
57
|
+
name?: string;
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
filterRange?: [number, number];
|
|
61
|
+
};
|
|
62
|
+
clone?: (props: object) => unknown;
|
|
63
|
+
}
|