@geoql/v-maplibre 1.1.3 → 1.2.1

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.
Files changed (83) hide show
  1. package/README.md +108 -122
  2. package/dist/index-kNnO8_Zs.js +56222 -0
  3. package/dist/index-kNnO8_Zs.js.map +1 -0
  4. package/dist/index-m5ZKPBwA.js +5106 -0
  5. package/dist/index-m5ZKPBwA.js.map +1 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +55 -1454
  8. package/dist/index.js.map +1 -1
  9. package/dist/layers/deckgl/_shared/index.d.ts +2 -0
  10. package/dist/layers/deckgl/_shared/types.d.ts +29 -0
  11. package/dist/layers/deckgl/_shared/useDeckOverlay.d.ts +30 -0
  12. package/dist/layers/deckgl/arc/VLayerDeckglArc.vue.d.ts +112 -0
  13. package/dist/layers/deckgl/arc/index.d.ts +1 -0
  14. package/dist/layers/deckgl/bitmap/VLayerDeckglBitmap.vue.d.ts +98 -0
  15. package/dist/layers/deckgl/bitmap/index.d.ts +1 -0
  16. package/dist/layers/deckgl/column/VLayerDeckglColumn.vue.d.ts +130 -0
  17. package/dist/layers/deckgl/column/index.d.ts +1 -0
  18. package/dist/layers/deckgl/contour/VLayerDeckglContour.vue.d.ts +110 -0
  19. package/dist/layers/deckgl/contour/index.d.ts +1 -0
  20. package/dist/layers/deckgl/generic/VLayerDeckgl.vue.d.ts +78 -0
  21. package/dist/layers/deckgl/generic/index.d.ts +1 -0
  22. package/dist/layers/deckgl/geohash/VLayerDeckglGeohash.vue.d.ts +116 -0
  23. package/dist/layers/deckgl/geohash/index.d.ts +1 -0
  24. package/dist/layers/deckgl/geojson/VLayerDeckglGeojson.vue.d.ts +134 -0
  25. package/dist/layers/deckgl/geojson/index.d.ts +1 -0
  26. package/dist/layers/deckgl/great-circle/VLayerDeckglGreatCircle.vue.d.ts +110 -0
  27. package/dist/layers/deckgl/great-circle/index.d.ts +1 -0
  28. package/dist/layers/deckgl/grid/VLayerDeckglGrid.vue.d.ts +124 -0
  29. package/dist/layers/deckgl/grid/index.d.ts +1 -0
  30. package/dist/layers/deckgl/grid-cell/VLayerDeckglGridCell.vue.d.ts +105 -0
  31. package/dist/layers/deckgl/grid-cell/index.d.ts +1 -0
  32. package/dist/layers/deckgl/h3-cluster/VLayerDeckglH3Cluster.vue.d.ts +116 -0
  33. package/dist/layers/deckgl/h3-cluster/index.d.ts +1 -0
  34. package/dist/layers/deckgl/h3-hexagon/VLayerDeckglH3Hexagon.vue.d.ts +120 -0
  35. package/dist/layers/deckgl/h3-hexagon/index.d.ts +1 -0
  36. package/dist/layers/deckgl/heatmap/VLayerDeckglHeatmap.vue.d.ts +107 -0
  37. package/dist/layers/deckgl/heatmap/index.d.ts +1 -0
  38. package/dist/layers/deckgl/hexagon/VLayerDeckglHexagon.vue.d.ts +125 -0
  39. package/dist/layers/deckgl/hexagon/index.d.ts +1 -0
  40. package/dist/layers/deckgl/icon/VLayerDeckglIcon.vue.d.ts +124 -0
  41. package/dist/layers/deckgl/icon/index.d.ts +1 -0
  42. package/dist/layers/deckgl/index.d.ts +35 -0
  43. package/dist/layers/deckgl/line/VLayerDeckglLine.vue.d.ts +106 -0
  44. package/dist/layers/deckgl/line/index.d.ts +1 -0
  45. package/dist/layers/deckgl/mvt/VLayerDeckglMVT.vue.d.ts +138 -0
  46. package/dist/layers/deckgl/mvt/index.d.ts +1 -0
  47. package/dist/layers/deckgl/path/VLayerDeckglPath.vue.d.ts +113 -0
  48. package/dist/layers/deckgl/path/index.d.ts +1 -0
  49. package/dist/layers/deckgl/point-cloud/VLayerDeckglPointCloud.vue.d.ts +101 -0
  50. package/dist/layers/deckgl/point-cloud/index.d.ts +1 -0
  51. package/dist/layers/deckgl/polygon/VLayerDeckglPolygon.vue.d.ts +122 -0
  52. package/dist/layers/deckgl/polygon/index.d.ts +1 -0
  53. package/dist/layers/deckgl/quadkey/VLayerDeckglQuadkey.vue.d.ts +116 -0
  54. package/dist/layers/deckgl/quadkey/index.d.ts +1 -0
  55. package/dist/layers/deckgl/s2/VLayerDeckglS2.vue.d.ts +116 -0
  56. package/dist/layers/deckgl/s2/index.d.ts +1 -0
  57. package/dist/layers/deckgl/scatterplot/VLayerDeckglScatterplot.vue.d.ts +122 -0
  58. package/dist/layers/deckgl/scatterplot/index.d.ts +1 -0
  59. package/dist/layers/deckgl/scenegraph/VLayerDeckglScenegraph.vue.d.ts +109 -0
  60. package/dist/layers/deckgl/scenegraph/index.d.ts +1 -0
  61. package/dist/layers/deckgl/screen-grid/VLayerDeckglScreenGrid.vue.d.ts +105 -0
  62. package/dist/layers/deckgl/screen-grid/index.d.ts +1 -0
  63. package/dist/layers/deckgl/simple-mesh/VLayerDeckglSimpleMesh.vue.d.ts +108 -0
  64. package/dist/layers/deckgl/simple-mesh/index.d.ts +1 -0
  65. package/dist/layers/deckgl/solid-polygon/VLayerDeckglSolidPolygon.vue.d.ts +106 -0
  66. package/dist/layers/deckgl/solid-polygon/index.d.ts +1 -0
  67. package/dist/layers/deckgl/terrain/VLayerDeckglTerrain.vue.d.ts +115 -0
  68. package/dist/layers/deckgl/terrain/index.d.ts +1 -0
  69. package/dist/layers/deckgl/text/VLayerDeckglText.vue.d.ts +132 -0
  70. package/dist/layers/deckgl/text/index.d.ts +1 -0
  71. package/dist/layers/deckgl/tile/VLayerDeckglTile.vue.d.ts +130 -0
  72. package/dist/layers/deckgl/tile/index.d.ts +1 -0
  73. package/dist/layers/deckgl/tile-3d/VLayerDeckglTile3D.vue.d.ts +103 -0
  74. package/dist/layers/deckgl/tile-3d/index.d.ts +1 -0
  75. package/dist/layers/deckgl/trips/VLayerDeckglTrips.vue.d.ts +118 -0
  76. package/dist/layers/deckgl/trips/index.d.ts +1 -0
  77. package/dist/layers/deckgl/wms/VLayerDeckglWMS.vue.d.ts +96 -0
  78. package/dist/layers/deckgl/wms/index.d.ts +1 -0
  79. package/dist/layers/index.d.ts +1 -0
  80. package/dist/layers/maplibre/vector/VLayerMaplibreVector.vue.d.ts +16 -16
  81. package/dist/map/VMap.vue.d.ts +22 -22
  82. package/dist/utils/symbols.d.ts +1 -0
  83. package/package.json +53 -23
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
  [![JSR](https://jsr.io/badges/@geoql/v-maplibre)](https://jsr.io/@geoql/v-maplibre)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
 
9
+ > **Using shadcn-vue?** Check out [mapcn-vue](https://mapcn-vue.geoql.in) for copy-paste map components styled with Tailwind CSS.
10
+
9
11
  ## Features
10
12
 
11
13
  - 🗺️ **Full MapLibre GL Support** - Complete wrapper around MapLibre GL JS
@@ -14,36 +16,36 @@
14
16
  - 🎨 **Reactive Components** - Reactive and composable map components
15
17
  - 🚀 **Nuxt 4 Ready** - Seamlessly works with Nuxt 4 and SSR
16
18
  - 🎯 **PMTiles Built-in** - Native support for PMTiles protocol
19
+ - 🌐 **deck.gl Integration** - High-performance WebGL visualization layers
17
20
 
18
21
  ## Installation
19
22
 
20
- ### From npm
21
-
22
23
  ```bash
23
- # pnpm
24
- pnpm add @geoql/v-maplibre maplibre-gl
24
+ # bun
25
+ bun add @geoql/v-maplibre maplibre-gl
25
26
 
26
27
  # npm
27
28
  npm install @geoql/v-maplibre maplibre-gl
28
29
 
29
30
  # yarn
30
31
  yarn add @geoql/v-maplibre maplibre-gl
31
- ```
32
32
 
33
- ### From JSR
33
+ # pnpm
34
+ pnpm add @geoql/v-maplibre maplibre-gl
35
+ ```
34
36
 
35
- ```bash
36
- # deno
37
- deno add @geoql/v-maplibre
37
+ ### deck.gl Layers (Optional)
38
38
 
39
- # npm (using JSR)
40
- npx jsr add @geoql/v-maplibre
39
+ For deck.gl visualization layers, install the required packages:
41
40
 
42
- # yarn
43
- yarn dlx jsr add @geoql/v-maplibre
41
+ ```bash
42
+ # Core deck.gl packages
43
+ bun add @deck.gl/core @deck.gl/layers @deck.gl/mapbox
44
44
 
45
- # pnpm
46
- pnpm dlx jsr add @geoql/v-maplibre
45
+ # Additional layer packages (as needed)
46
+ bun add @deck.gl/aggregation-layers # Heatmap, Hexagon, Grid
47
+ bun add @deck.gl/geo-layers # Trips, MVT, Tile, H3
48
+ bun add @deck.gl/mesh-layers # SimpleMesh, Scenegraph
47
49
  ```
48
50
 
49
51
  ## Quick Start
@@ -76,7 +78,7 @@ pnpm dlx jsr add @geoql/v-maplibre
76
78
  - **`VMarker`** - Interactive markers
77
79
  - **`VPopup`** - Popups and tooltips
78
80
 
79
- ### Layer Components
81
+ ### MapLibre Layer Components
80
82
 
81
83
  - **`VLayerMaplibreGeojson`** - GeoJSON layers
82
84
  - **`VLayerMaplibreVector`** - Vector tile layers
@@ -87,6 +89,46 @@ pnpm dlx jsr add @geoql/v-maplibre
87
89
  - **`VLayerMaplibreCluster`** - Clustered point layers
88
90
  - **`VLayerMaplibrePmtile`** - PMTiles layers
89
91
 
92
+ ### deck.gl Layer Components
93
+
94
+ High-performance WebGL visualization layers powered by deck.gl:
95
+
96
+ **Core Layers**
97
+
98
+ - `VLayerDeckglScatterplot` - Circles/points
99
+ - `VLayerDeckglArc` - Origin-destination arcs
100
+ - `VLayerDeckglLine` - Flat lines
101
+ - `VLayerDeckglPath` - Polylines/routes
102
+ - `VLayerDeckglPolygon` - Filled polygons
103
+ - `VLayerDeckglGeojson` - GeoJSON features
104
+ - `VLayerDeckglIcon` - Custom markers
105
+ - `VLayerDeckglText` - Text labels
106
+ - `VLayerDeckglColumn` - 3D columns
107
+ - `VLayerDeckglBitmap` - Georeferenced images
108
+
109
+ **Aggregation Layers**
110
+
111
+ - `VLayerDeckglHeatmap` - Density heatmap
112
+ - `VLayerDeckglHexagon` - Hexagonal binning
113
+ - `VLayerDeckglGrid` - Square grid aggregation
114
+ - `VLayerDeckglContour` - Contour/isolines
115
+ - `VLayerDeckglScreenGrid` - Screen-space grid
116
+
117
+ **Geo Layers**
118
+
119
+ - `VLayerDeckglTrips` - Animated paths
120
+ - `VLayerDeckglMVT` - Mapbox Vector Tiles
121
+ - `VLayerDeckglTile` - Generic tiles
122
+ - `VLayerDeckglTile3D` - 3D Tiles (Cesium)
123
+ - `VLayerDeckglTerrain` - Terrain mesh
124
+ - `VLayerDeckglH3Hexagon` - H3 hexagons
125
+ - `VLayerDeckglGreatCircle` - Great circle arcs
126
+
127
+ **Mesh Layers**
128
+
129
+ - `VLayerDeckglSimpleMesh` - 3D meshes
130
+ - `VLayerDeckglScenegraph` - glTF/GLB models
131
+
90
132
  ### Control Components
91
133
 
92
134
  - **`VControlNavigation`** - Navigation controls (zoom, rotate)
@@ -95,6 +137,40 @@ pnpm dlx jsr add @geoql/v-maplibre
95
137
  - **`VControlFullscreen`** - Fullscreen toggle
96
138
  - **`VControlAttribution`** - Attribution control
97
139
 
140
+ ## deck.gl Example
141
+
142
+ ```vue
143
+ <script setup lang="ts">
144
+ import { VMap, VLayerDeckglScatterplot } from '@geoql/v-maplibre';
145
+
146
+ const mapOptions = {
147
+ style: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
148
+ center: [-122.4, 37.8],
149
+ zoom: 11,
150
+ };
151
+
152
+ const data = [
153
+ { coordinates: [-122.4, 37.8], size: 100 },
154
+ { coordinates: [-122.5, 37.7], size: 200 },
155
+ ];
156
+ </script>
157
+
158
+ <template>
159
+ <VMap :options="mapOptions" style="height: 500px">
160
+ <VLayerDeckglScatterplot
161
+ id="points"
162
+ :data="data"
163
+ :get-position="(d) => d.coordinates"
164
+ :get-radius="(d) => d.size"
165
+ :get-fill-color="[255, 140, 0]"
166
+ :radius-min-pixels="5"
167
+ :pickable="true"
168
+ @click="(info) => console.log('Clicked:', info.object)"
169
+ ></VLayerDeckglScatterplot>
170
+ </VMap>
171
+ </template>
172
+ ```
173
+
98
174
  ## Usage with Nuxt
99
175
 
100
176
  For Nuxt applications, wrap the map component with `ClientOnly`:
@@ -120,7 +196,6 @@ For Nuxt applications, wrap the map component with `ClientOnly`:
120
196
  Add styles to your `nuxt.config.ts`:
121
197
 
122
198
  ```typescript
123
- // nuxt.config.ts
124
199
  export default defineNuxtConfig({
125
200
  css: [
126
201
  'maplibre-gl/dist/maplibre-gl.css',
@@ -129,123 +204,33 @@ export default defineNuxtConfig({
129
204
  });
130
205
  ```
131
206
 
132
- Or create a Nuxt plugin to import styles:
133
-
134
- ```typescript
135
- // plugins/maplibre.client.ts
136
- import 'maplibre-gl/dist/maplibre-gl.css';
137
- import '@geoql/v-maplibre/dist/v-maplibre.css';
138
-
139
- export default defineNuxtPlugin(() => {
140
- // Plugin loaded
141
- });
142
- ```
143
-
144
- ## Examples
145
-
146
- ### GeoJSON Layer
147
-
148
- ```vue
149
- <script setup lang="ts">
150
- import { VMap, VLayerMaplibreGeojson } from '@geoql/v-maplibre';
151
- import type { GeoJSONSourceSpecification } from 'maplibre-gl';
152
-
153
- const geojsonSource: GeoJSONSourceSpecification = {
154
- type: 'geojson',
155
- data: {
156
- type: 'FeatureCollection',
157
- features: [
158
- {
159
- type: 'Feature',
160
- geometry: {
161
- type: 'Point',
162
- coordinates: [-74.5, 40],
163
- },
164
- properties: { name: 'Example Point' },
165
- },
166
- ],
167
- },
168
- };
169
-
170
- const layerOptions = {
171
- id: 'points',
172
- type: 'circle' as const,
173
- paint: {
174
- 'circle-radius': 8,
175
- 'circle-color': '#007cbf',
176
- },
177
- };
178
- </script>
179
-
180
- <template>
181
- <VMap :options="mapOptions" style="height: 500px">
182
- <VLayerMaplibreGeojson
183
- :source="geojsonSource"
184
- :layer="layerOptions"
185
- ></VLayerMaplibreGeojson>
186
- </VMap>
187
- </template>
188
- ```
189
-
190
- ### PMTiles Support
191
-
192
- ```vue
193
- <script setup lang="ts">
194
- import { VMap, VLayerMaplibrePmtile } from '@geoql/v-maplibre';
195
-
196
- const pmtilesUrl = 'https://example.com/tiles.pmtiles';
197
-
198
- const layerOptions = {
199
- id: 'pmtiles-layer',
200
- type: 'fill' as const,
201
- paint: {
202
- 'fill-color': '#088',
203
- 'fill-opacity': 0.5,
204
- },
205
- };
206
- </script>
207
-
208
- <template>
209
- <VMap :options="mapOptions" support-pmtiles style="height: 500px">
210
- <VLayerMaplibrePmtile
211
- :url="pmtilesUrl"
212
- :layer="layerOptions"
213
- ></VLayerMaplibrePmtile>
214
- </VMap>
215
- </template>
216
- ```
217
-
218
- ## Documentation
219
-
220
- Visit our [documentation site](#) for:
221
-
222
- - Complete API reference
223
- - Detailed component guides
224
- - Interactive examples
225
- - Migration guides
226
-
227
207
  ## TypeScript Support
228
208
 
229
- All components are fully typed. Import types from `maplibre-gl`:
209
+ All components are fully typed. Import types as needed:
230
210
 
231
211
  ```typescript
232
- import type { MapOptions, LngLatLike, GeoJSONSource } from 'maplibre-gl';
212
+ import type { MapOptions, LngLatLike } from 'maplibre-gl';
213
+ import type { Color, PickingInfo } from '@deck.gl/core';
233
214
  ```
234
215
 
235
216
  ## Development
236
217
 
218
+ This package is part of the [v-maplibre monorepo](https://github.com/geoql/v-maplibre).
219
+
237
220
  ```bash
238
- # Install dependencies
239
- pnpm install
221
+ # Clone and install (from monorepo root)
222
+ git clone https://github.com/geoql/v-maplibre.git
223
+ cd v-maplibre
224
+ bun install
240
225
 
241
- # Build the library
242
- pnpm build
226
+ # Build this package
227
+ bun run --cwd packages/v-maplibre build
243
228
 
244
- # Run documentation
245
- pnpm docs:dev
229
+ # Run tests
230
+ bun run test
246
231
 
247
- # Build documentation
248
- pnpm docs:build
232
+ # Watch mode
233
+ bun run dev:lib
249
234
  ```
250
235
 
251
236
  ## License
@@ -257,6 +242,7 @@ MIT License - see [LICENSE](LICENSE) for details
257
242
  Built with:
258
243
 
259
244
  - [MapLibre GL JS](https://maplibre.org/)
245
+ - [deck.gl](https://deck.gl/)
260
246
  - [Vue 3](https://vuejs.org/)
261
247
  - [Vite](https://vitejs.dev/)
262
248
  - [PMTiles](https://github.com/protomaps/PMTiles)