vue3-maplibre-gl 3.2.0 → 3.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.
- package/README.md +274 -27
- package/dist/components/CircleLayer.vue.d.ts +98 -0
- package/dist/components/CircleLayer.vue.d.ts.map +1 -0
- package/dist/components/FillLayer.vue.d.ts +87 -0
- package/dist/components/FillLayer.vue.d.ts.map +1 -0
- package/dist/components/GeoJsonSource.vue.d.ts +107 -0
- package/dist/components/GeoJsonSource.vue.d.ts.map +1 -0
- package/dist/components/GeolocateControls.vue.d.ts +98 -0
- package/dist/components/GeolocateControls.vue.d.ts.map +1 -0
- package/dist/components/Image.vue.d.ts +66 -0
- package/dist/components/Image.vue.d.ts.map +1 -0
- package/dist/components/LineLayer.vue.d.ts +87 -0
- package/dist/components/LineLayer.vue.d.ts.map +1 -0
- package/dist/components/Mapbox.vue.d.ts +181 -0
- package/dist/components/Mapbox.vue.d.ts.map +1 -0
- package/dist/components/Marker.vue.d.ts +80 -0
- package/dist/components/Marker.vue.d.ts.map +1 -0
- package/dist/components/PopUp.vue.d.ts +83 -0
- package/dist/components/PopUp.vue.d.ts.map +1 -0
- package/dist/components/SymbolLayer.vue.d.ts +87 -0
- package/dist/components/SymbolLayer.vue.d.ts.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/composables/control/index.d.ts +2 -0
- package/dist/composables/control/index.d.ts.map +1 -0
- package/dist/composables/control/useGeolocateControl.d.ts +27 -0
- package/dist/composables/control/useGeolocateControl.d.ts.map +1 -0
- package/dist/composables/event/index.d.ts +5 -0
- package/dist/composables/event/index.d.ts.map +1 -0
- package/dist/composables/event/useGeolocateEventListener.d.ts +35 -0
- package/dist/composables/event/useGeolocateEventListener.d.ts.map +1 -0
- package/dist/composables/event/useLayerEventListener.d.ts +37 -0
- package/dist/composables/event/useLayerEventListener.d.ts.map +1 -0
- package/dist/composables/event/useMapEventListener.d.ts +35 -0
- package/dist/composables/event/useMapEventListener.d.ts.map +1 -0
- package/dist/composables/event/useMapReloadEvent.d.ts +51 -0
- package/dist/composables/event/useMapReloadEvent.d.ts.map +1 -0
- package/dist/composables/index.d.ts +7 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/layers/index.d.ts +6 -0
- package/dist/composables/layers/index.d.ts.map +1 -0
- package/dist/composables/layers/useCreateCircleLayer.d.ts +39 -0
- package/dist/composables/layers/useCreateCircleLayer.d.ts.map +1 -0
- package/dist/composables/layers/useCreateFillLayer.d.ts +39 -0
- package/dist/composables/layers/useCreateFillLayer.d.ts.map +1 -0
- package/dist/composables/layers/useCreateLayer.d.ts +50 -0
- package/dist/composables/layers/useCreateLayer.d.ts.map +1 -0
- package/dist/composables/layers/useCreateLineLayer.d.ts +45 -0
- package/dist/composables/layers/useCreateLineLayer.d.ts.map +1 -0
- package/dist/composables/layers/useCreateSymbolLayer.d.ts +55 -0
- package/dist/composables/layers/useCreateSymbolLayer.d.ts.map +1 -0
- package/dist/composables/map/index.d.ts +8 -0
- package/dist/composables/map/index.d.ts.map +1 -0
- package/dist/composables/map/useCreateImage.d.ts +41 -0
- package/dist/composables/map/useCreateImage.d.ts.map +1 -0
- package/dist/composables/map/useCreateMapbox.d.ts +69 -0
- package/dist/composables/map/useCreateMapbox.d.ts.map +1 -0
- package/dist/composables/map/useCreateMarker.d.ts +61 -0
- package/dist/composables/map/useCreateMarker.d.ts.map +1 -0
- package/dist/composables/map/useCreatePopup.d.ts +66 -0
- package/dist/composables/map/useCreatePopup.d.ts.map +1 -0
- package/dist/composables/map/useGeoJsonSource.d.ts +43 -0
- package/dist/composables/map/useGeoJsonSource.d.ts.map +1 -0
- package/dist/composables/map/useLayer.d.ts +48 -0
- package/dist/composables/map/useLayer.d.ts.map +1 -0
- package/dist/composables/map/useMapbox.d.ts +41 -0
- package/dist/composables/map/useMapbox.d.ts.map +1 -0
- package/dist/composables/sources/index.d.ts +2 -0
- package/dist/composables/sources/index.d.ts.map +1 -0
- package/dist/composables/sources/useCreateGeoJsonSource.d.ts +40 -0
- package/dist/composables/sources/useCreateGeoJsonSource.d.ts.map +1 -0
- package/dist/composables/utils/index.d.ts +10 -0
- package/dist/composables/utils/index.d.ts.map +1 -0
- package/dist/composables/utils/useBounds.d.ts +59 -0
- package/dist/composables/utils/useBounds.d.ts.map +1 -0
- package/dist/composables/utils/useEaseTo.d.ts +39 -0
- package/dist/composables/utils/useEaseTo.d.ts.map +1 -0
- package/dist/composables/utils/useFitScreenCoordinates.d.ts +57 -0
- package/dist/composables/utils/useFitScreenCoordinates.d.ts.map +1 -0
- package/dist/composables/utils/useFlyTo.d.ts +39 -0
- package/dist/composables/utils/useFlyTo.d.ts.map +1 -0
- package/dist/composables/utils/useJumpTo.d.ts +47 -0
- package/dist/composables/utils/useJumpTo.d.ts.map +1 -0
- package/dist/composables/utils/useLogger.d.ts +6 -0
- package/dist/composables/utils/useLogger.d.ts.map +1 -0
- package/dist/composables/utils/usePan.d.ts +80 -0
- package/dist/composables/utils/usePan.d.ts.map +1 -0
- package/dist/composables/utils/useRotate.d.ts +120 -0
- package/dist/composables/utils/useRotate.d.ts.map +1 -0
- package/dist/composables/utils/useZoom.d.ts +106 -0
- package/dist/composables/utils/useZoom.d.ts.map +1 -0
- package/dist/enums/MapProvideKey.d.ts +7 -0
- package/dist/enums/MapProvideKey.d.ts.map +1 -0
- package/dist/enums/MapboxEnum.d.ts +13 -0
- package/dist/enums/MapboxEnum.d.ts.map +1 -0
- package/dist/enums/MapboxLayerEnum.d.ts +4 -0
- package/dist/enums/MapboxLayerEnum.d.ts.map +1 -0
- package/dist/enums/index.d.ts +4 -0
- package/dist/enums/index.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +9 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/index.d.ts +8 -2816
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19557 -17637
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +297 -134
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +236 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Vue3 MapLibre GL
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/vue3-maplibre-gl) [](https://www.npmjs.com/package/vue3-maplibre-gl) [](https://github.com/danh121097/vue-mapbox-gl/stargazers) [](https://github.com/danh121097/vue-mapbox-gl/blob/main/LICENSE)
|
|
4
4
|
|
|
5
|
-
> Vue 3
|
|
5
|
+
> **The most comprehensive Vue 3 library for MapLibre GL JS** - Build interactive maps with 10+ components and 15+ composables
|
|
6
6
|
|
|
7
|
-
A
|
|
7
|
+
A powerful, feature-rich Vue 3 component library that provides an intuitive, reactive way to build interactive maps in your Vue applications using MapLibre GL JS.
|
|
8
8
|
|
|
9
9
|
## ✨ Features
|
|
10
10
|
|
|
11
|
-
- 🗺️ **Interactive Maps** -
|
|
12
|
-
- 🧩 **
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- 📱 **
|
|
11
|
+
- 🗺️ **Interactive Maps** - High-performance vector maps with WebGL rendering
|
|
12
|
+
- 🧩 **10+ Vue Components** - Mapbox, GeoJsonSource, FillLayer, CircleLayer, LineLayer, SymbolLayer, Marker, PopUp, Image, GeolocateControls
|
|
13
|
+
- 🔧 **15+ Composables** - Complete map management, animations, events, and utilities
|
|
14
|
+
- 🎯 **Full TypeScript Support** - Comprehensive type definitions and interfaces
|
|
15
|
+
- ⚡ **High Performance** - Optimized rendering with automatic resource cleanup
|
|
16
|
+
- 📱 **Mobile-Friendly** - Touch controls and responsive design for all devices
|
|
17
|
+
- 🌐 **Self-Contained** - Bundled CSS and automatic dependency management
|
|
18
|
+
- 🔄 **Reactive Data Binding** - Seamless integration with Vue 3's reactivity system
|
|
17
19
|
|
|
18
20
|
## 📦 Installation
|
|
19
21
|
|
|
@@ -39,32 +41,237 @@ pnpm add vue3-maplibre-gl
|
|
|
39
41
|
|
|
40
42
|
```vue
|
|
41
43
|
<template>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
<Mapbox :options="mapOptions" style="height: 500px" @load="onMapLoad">
|
|
45
|
+
<!-- GeoJSON Data Source -->
|
|
46
|
+
<GeoJsonSource :data="geoJsonData">
|
|
47
|
+
<FillLayer :style="fillStyle" />
|
|
48
|
+
<CircleLayer :style="circleStyle" />
|
|
49
|
+
</GeoJsonSource>
|
|
50
|
+
|
|
51
|
+
<!-- Interactive Marker -->
|
|
52
|
+
<Marker :lnglat="[0, 0]" :draggable="true">
|
|
49
53
|
<div class="marker">📍</div>
|
|
50
|
-
</
|
|
51
|
-
|
|
54
|
+
</Marker>
|
|
55
|
+
|
|
56
|
+
<!-- Popup -->
|
|
57
|
+
<PopUp :lnglat="[0, 0]" :show="true">
|
|
58
|
+
<div class="popup-content">
|
|
59
|
+
<h3>Welcome to Vue3 MapLibre GL!</h3>
|
|
60
|
+
<p>Interactive maps made easy with Vue 3</p>
|
|
61
|
+
</div>
|
|
62
|
+
</PopUp>
|
|
63
|
+
|
|
64
|
+
<!-- Geolocation Control -->
|
|
65
|
+
<GeolocateControls position="top-right" />
|
|
66
|
+
</Mapbox>
|
|
52
67
|
</template>
|
|
53
68
|
|
|
54
69
|
<script setup>
|
|
55
|
-
import {
|
|
70
|
+
import { ref } from 'vue';
|
|
71
|
+
import {
|
|
72
|
+
Mapbox,
|
|
73
|
+
GeoJsonSource,
|
|
74
|
+
FillLayer,
|
|
75
|
+
CircleLayer,
|
|
76
|
+
Marker,
|
|
77
|
+
PopUp,
|
|
78
|
+
GeolocateControls,
|
|
79
|
+
} from 'vue3-maplibre-gl';
|
|
56
80
|
import 'vue3-maplibre-gl/dist/style.css';
|
|
57
81
|
|
|
58
|
-
const
|
|
82
|
+
const mapOptions = ref({
|
|
83
|
+
style: 'https://demotiles.maplibre.org/style.json',
|
|
84
|
+
center: [0, 0],
|
|
85
|
+
zoom: 2,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const geoJsonData = ref({
|
|
89
|
+
type: 'FeatureCollection',
|
|
90
|
+
features: [
|
|
91
|
+
{
|
|
92
|
+
type: 'Feature',
|
|
93
|
+
geometry: { type: 'Point', coordinates: [0, 0] },
|
|
94
|
+
properties: { name: 'Sample Point' },
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const fillStyle = ref({
|
|
100
|
+
'fill-color': '#088',
|
|
101
|
+
'fill-opacity': 0.8,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const circleStyle = ref({
|
|
105
|
+
'circle-radius': 6,
|
|
106
|
+
'circle-color': '#007cbf',
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
function onMapLoad(map) {
|
|
110
|
+
console.log('Map loaded:', map);
|
|
111
|
+
}
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<style>
|
|
115
|
+
.marker {
|
|
116
|
+
font-size: 24px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.popup-content {
|
|
121
|
+
padding: 10px;
|
|
122
|
+
max-width: 200px;
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 🧩 Components
|
|
128
|
+
|
|
129
|
+
Vue3 MapLibre GL provides 10+ reactive Vue components:
|
|
130
|
+
|
|
131
|
+
| Component | Description |
|
|
132
|
+
| --------------------- | ------------------------------------------------------------- |
|
|
133
|
+
| **Mapbox** | Main map container with comprehensive event handling |
|
|
134
|
+
| **GeoJsonSource** | Reactive data source for GeoJSON data with clustering support |
|
|
135
|
+
| **FillLayer** | Render filled polygons with customizable styling |
|
|
136
|
+
| **CircleLayer** | Display point data as circles with dynamic sizing |
|
|
137
|
+
| **LineLayer** | Render linear features like routes and boundaries |
|
|
138
|
+
| **SymbolLayer** | Display icons and text labels |
|
|
139
|
+
| **Marker** | HTML markers with drag support and custom content |
|
|
140
|
+
| **PopUp** | Interactive popup windows with custom HTML |
|
|
141
|
+
| **Image** | Manage and load images for map styles |
|
|
142
|
+
| **GeolocateControls** | User location tracking with comprehensive events |
|
|
143
|
+
|
|
144
|
+
## 🔧 Composables
|
|
145
|
+
|
|
146
|
+
15+ powerful composables for advanced map functionality:
|
|
147
|
+
|
|
148
|
+
### Map Management
|
|
149
|
+
|
|
150
|
+
- `useCreateMapbox` - Enhanced map creation with error handling
|
|
151
|
+
- `useMapbox` - Simplified map state management
|
|
152
|
+
|
|
153
|
+
### Layer Management
|
|
154
|
+
|
|
155
|
+
- `useCreateFillLayer` - Fill layer creation and management
|
|
156
|
+
- `useCreateCircleLayer` - Circle layer for point visualization
|
|
157
|
+
- `useCreateLineLayer` - Line layer for linear features
|
|
158
|
+
- `useCreateSymbolLayer` - Symbol layer for icons and text
|
|
159
|
+
|
|
160
|
+
### Source Management
|
|
161
|
+
|
|
162
|
+
- `useCreateGeoJsonSource` - GeoJSON source with reactive data
|
|
163
|
+
- `useGeoJsonSource` - Simplified source management
|
|
164
|
+
|
|
165
|
+
### Controls
|
|
166
|
+
|
|
167
|
+
- `useGeolocateControl` - User location tracking
|
|
168
|
+
|
|
169
|
+
### Events
|
|
170
|
+
|
|
171
|
+
- `useMapEventListener` - Map event handling
|
|
172
|
+
- `useLayerEventListener` - Layer-specific events
|
|
173
|
+
|
|
174
|
+
### Utilities
|
|
175
|
+
|
|
176
|
+
- `useFlyTo` - Smooth map animations
|
|
177
|
+
- `useEaseTo` - Easing animations
|
|
178
|
+
- `useJumpTo` - Instant position changes
|
|
179
|
+
- `useBounds` - Bounds management
|
|
180
|
+
- `useZoom` - Zoom controls
|
|
181
|
+
- `useLogger` - Consistent logging
|
|
182
|
+
|
|
183
|
+
## 🎯 TypeScript Support
|
|
184
|
+
|
|
185
|
+
Vue3 MapLibre GL includes comprehensive TypeScript support:
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
import { ref } from 'vue';
|
|
189
|
+
import {
|
|
190
|
+
Mapbox,
|
|
191
|
+
GeoJsonSource,
|
|
192
|
+
FillLayer,
|
|
193
|
+
type MapboxProps,
|
|
194
|
+
type FillLayerStyle,
|
|
195
|
+
type GeoJSONSourceSpecification,
|
|
196
|
+
} from 'vue3-maplibre-gl';
|
|
197
|
+
|
|
198
|
+
const mapOptions = ref<MapboxProps['options']>({
|
|
199
|
+
style: 'https://demotiles.maplibre.org/style.json',
|
|
200
|
+
center: [0, 0],
|
|
201
|
+
zoom: 2,
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const fillStyle = ref<FillLayerStyle>({
|
|
205
|
+
'fill-color': '#088',
|
|
206
|
+
'fill-opacity': 0.8,
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const geoJsonData = ref<GeoJSONSourceSpecification['data']>({
|
|
210
|
+
type: 'FeatureCollection',
|
|
211
|
+
features: [],
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 🌟 Advanced Example with Composables
|
|
216
|
+
|
|
217
|
+
```vue
|
|
218
|
+
<script setup>
|
|
219
|
+
import { ref } from 'vue';
|
|
220
|
+
import {
|
|
221
|
+
useCreateMapbox,
|
|
222
|
+
useFlyTo,
|
|
223
|
+
useMapEventListener,
|
|
224
|
+
useCreateGeoJsonSource,
|
|
225
|
+
} from 'vue3-maplibre-gl';
|
|
226
|
+
|
|
227
|
+
const mapContainer = ref();
|
|
228
|
+
const mapStyle = ref('https://demotiles.maplibre.org/style.json');
|
|
229
|
+
|
|
230
|
+
// Create map with enhanced error handling
|
|
231
|
+
const { mapInstance, setCenter, setZoom } = useCreateMapbox(
|
|
232
|
+
mapContainer,
|
|
233
|
+
mapStyle,
|
|
234
|
+
{
|
|
235
|
+
onLoad: (map) => console.log('Map loaded:', map),
|
|
236
|
+
onError: (error) => console.error('Map error:', error),
|
|
237
|
+
debug: true,
|
|
238
|
+
},
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
// Add smooth animations
|
|
242
|
+
const { flyTo } = useFlyTo({ map: mapInstance });
|
|
243
|
+
|
|
244
|
+
// Create reactive data source
|
|
245
|
+
const { setData } = useCreateGeoJsonSource({
|
|
246
|
+
map: mapInstance,
|
|
247
|
+
id: 'my-source',
|
|
248
|
+
data: { type: 'FeatureCollection', features: [] },
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Listen to map events
|
|
252
|
+
useMapEventListener({
|
|
253
|
+
map: mapInstance,
|
|
254
|
+
event: 'click',
|
|
255
|
+
handler: (event) => {
|
|
256
|
+
flyTo({
|
|
257
|
+
center: event.lngLat,
|
|
258
|
+
zoom: 12,
|
|
259
|
+
duration: 2000,
|
|
260
|
+
});
|
|
261
|
+
},
|
|
262
|
+
});
|
|
59
263
|
</script>
|
|
60
264
|
```
|
|
61
265
|
|
|
62
266
|
## 📚 Documentation
|
|
63
267
|
|
|
64
|
-
- **[Getting Started](https://danh121097.github.io/vue-mapbox-gl/guide/getting-started)** - Learn the basics
|
|
268
|
+
- **[Getting Started](https://danh121097.github.io/vue-mapbox-gl/guide/getting-started)** - Learn the basics and see examples
|
|
65
269
|
- **[Installation Guide](https://danh121097.github.io/vue-mapbox-gl/guide/installation)** - Detailed setup instructions
|
|
66
|
-
- **[
|
|
67
|
-
- **[
|
|
270
|
+
- **[Configuration](https://danh121097.github.io/vue-mapbox-gl/guide/configuration)** - Advanced configuration options
|
|
271
|
+
- **[Components API](https://danh121097.github.io/vue-mapbox-gl/api/components)** - Complete component documentation
|
|
272
|
+
- **[Composables API](https://danh121097.github.io/vue-mapbox-gl/api/composables)** - Composables reference
|
|
273
|
+
- **[TypeScript Types](https://danh121097.github.io/vue-mapbox-gl/api/types)** - Type definitions
|
|
274
|
+
- **[Live Examples](https://danh121097.github.io/vue-mapbox-gl/examples/)** - Interactive demos
|
|
68
275
|
|
|
69
276
|
## 🛠️ Development
|
|
70
277
|
|
|
@@ -86,21 +293,61 @@ yarn build
|
|
|
86
293
|
yarn docs:dev
|
|
87
294
|
```
|
|
88
295
|
|
|
296
|
+
## 🌟 Why Choose Vue3 MapLibre GL?
|
|
297
|
+
|
|
298
|
+
- **🎯 Vue 3 Native** - Built specifically for Vue 3 with Composition API support
|
|
299
|
+
- **🗺️ MapLibre GL JS** - Uses the open-source MapLibre GL JS for high-performance rendering
|
|
300
|
+
- **🧩 Component-Based** - 10+ Vue components for maps, layers, sources, markers, and controls
|
|
301
|
+
- **🔧 Powerful Composables** - 15+ composables for map management, animations, and utilities
|
|
302
|
+
- **📚 Comprehensive Documentation** - Detailed guides, API references, and examples
|
|
303
|
+
- **⚡ High Performance** - Optimized for performance with automatic resource cleanup
|
|
304
|
+
- **🌐 Open Source** - MIT licensed with active community support
|
|
305
|
+
- **📱 Mobile Ready** - Touch-friendly controls and responsive design
|
|
306
|
+
|
|
89
307
|
## 🤝 Contributing
|
|
90
308
|
|
|
91
309
|
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
|
|
92
310
|
|
|
311
|
+
### Development Setup
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Clone the repository
|
|
315
|
+
git clone https://github.com/danh121097/vue-mapbox-gl.git
|
|
316
|
+
cd vue-mapbox-gl
|
|
317
|
+
|
|
318
|
+
# Install dependencies
|
|
319
|
+
yarn install
|
|
320
|
+
|
|
321
|
+
# Start development server
|
|
322
|
+
yarn dev
|
|
323
|
+
|
|
324
|
+
# Run tests
|
|
325
|
+
yarn test
|
|
326
|
+
|
|
327
|
+
# Build the library
|
|
328
|
+
yarn build
|
|
329
|
+
|
|
330
|
+
# Run documentation
|
|
331
|
+
yarn docs:dev
|
|
332
|
+
```
|
|
333
|
+
|
|
93
334
|
## 📄 License
|
|
94
335
|
|
|
95
336
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
96
337
|
|
|
97
338
|
## 🙏 Acknowledgments
|
|
98
339
|
|
|
99
|
-
- Built on top of [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/)
|
|
340
|
+
- Built on top of [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) - The open-source mapping library
|
|
100
341
|
- Inspired by the Vue.js ecosystem and community
|
|
342
|
+
- Thanks to all contributors and users who make this project better
|
|
101
343
|
|
|
102
344
|
## 📞 Support
|
|
103
345
|
|
|
104
|
-
- 📖 [Documentation](https://danh121097.github.io/vue-mapbox-gl/)
|
|
105
|
-
- 🐛 [Issues](https://github.com/danh121097/vue-mapbox-gl/issues)
|
|
106
|
-
- 💬 [Discussions](https://github.com/danh121097/vue-mapbox-gl/discussions)
|
|
346
|
+
- 📖 [Documentation](https://danh121097.github.io/vue-mapbox-gl/) - Comprehensive guides and API reference
|
|
347
|
+
- 🐛 [Issues](https://github.com/danh121097/vue-mapbox-gl/issues) - Bug reports and feature requests
|
|
348
|
+
- 💬 [Discussions](https://github.com/danh121097/vue-mapbox-gl/discussions) - Community discussions and questions
|
|
349
|
+
- ⭐ [GitHub](https://github.com/danh121097/vue-mapbox-gl) - Star the project if you find it useful!
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
**Made with ❤️ for the Vue.js community**
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { CreateLayerActions, CircleLayerStyle } from '../types';
|
|
2
|
+
import { Map, MapLayerMouseEvent, MapLayerTouchEvent, FilterSpecification, CircleLayerSpecification } from 'maplibre-gl';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props interface for CircleLayer component
|
|
6
|
+
* Defines all configurable properties for a MapLibre GL Circle Layer
|
|
7
|
+
*/
|
|
8
|
+
interface LayerProps {
|
|
9
|
+
/** Unique identifier for the layer */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Filter expression to apply to the layer */
|
|
12
|
+
filter: FilterSpecification;
|
|
13
|
+
/** Style configuration for the circle layer */
|
|
14
|
+
style: CircleLayerStyle;
|
|
15
|
+
/** Maximum zoom level for layer visibility */
|
|
16
|
+
maxzoom: number;
|
|
17
|
+
/** Minimum zoom level for layer visibility */
|
|
18
|
+
minzoom: number;
|
|
19
|
+
/** Arbitrary metadata for the layer */
|
|
20
|
+
metadata: object;
|
|
21
|
+
/** Data source for the layer */
|
|
22
|
+
source: string | object;
|
|
23
|
+
/** Source layer name for vector sources */
|
|
24
|
+
sourceLayer: string;
|
|
25
|
+
/** ID of layer before which to insert this layer */
|
|
26
|
+
beforeId: string;
|
|
27
|
+
/** Whether the layer is visible */
|
|
28
|
+
visible: boolean;
|
|
29
|
+
/** Enable debug logging */
|
|
30
|
+
debug: boolean;
|
|
31
|
+
/** Callback function to register layer actions */
|
|
32
|
+
register: (actions: CreateLayerActions<CircleLayerSpecification>, map: Map) => void;
|
|
33
|
+
}
|
|
34
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
|
|
35
|
+
visible: boolean;
|
|
36
|
+
debug: boolean;
|
|
37
|
+
filter: () => FilterSpecification;
|
|
38
|
+
style: () => CircleLayerStyle;
|
|
39
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
+
touchcancel: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
41
|
+
touchend: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
42
|
+
touchstart: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
43
|
+
click: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
44
|
+
contextmenu: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
45
|
+
dblclick: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
46
|
+
mousemove: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
47
|
+
mouseup: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
48
|
+
mousedown: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
49
|
+
mouseout: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
50
|
+
mouseover: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
51
|
+
mouseenter: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
52
|
+
mouseleave: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
53
|
+
register: (actions: CreateLayerActions<CircleLayerSpecification>, map: Map) => void;
|
|
54
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
|
|
55
|
+
visible: boolean;
|
|
56
|
+
debug: boolean;
|
|
57
|
+
filter: () => FilterSpecification;
|
|
58
|
+
style: () => CircleLayerStyle;
|
|
59
|
+
}>>> & Readonly<{
|
|
60
|
+
onTouchcancel?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
61
|
+
onTouchend?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
62
|
+
onTouchstart?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
63
|
+
onClick?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
64
|
+
onContextmenu?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
65
|
+
onDblclick?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
66
|
+
onMousemove?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
67
|
+
onMouseup?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
68
|
+
onMousedown?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
69
|
+
onMouseout?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
70
|
+
onMouseover?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
71
|
+
onMouseenter?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
72
|
+
onMouseleave?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
73
|
+
onRegister?: ((actions: CreateLayerActions<CircleLayerSpecification>, map: Map) => any) | undefined;
|
|
74
|
+
}>, {
|
|
75
|
+
visible: boolean;
|
|
76
|
+
filter: FilterSpecification;
|
|
77
|
+
debug: boolean;
|
|
78
|
+
style: CircleLayerStyle;
|
|
79
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
80
|
+
export default _default;
|
|
81
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
82
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
83
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
84
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
85
|
+
} : {
|
|
86
|
+
type: import('vue').PropType<T[K]>;
|
|
87
|
+
required: true;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type __VLS_WithDefaults<P, D> = {
|
|
91
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
92
|
+
default: D[K];
|
|
93
|
+
}> : P[K];
|
|
94
|
+
};
|
|
95
|
+
type __VLS_Prettify<T> = {
|
|
96
|
+
[K in keyof T]: T[K];
|
|
97
|
+
} & {};
|
|
98
|
+
//# sourceMappingURL=CircleLayer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircleLayer.vue.d.ts","sourceRoot":"","sources":["../../libs/components/CircleLayer.vue"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,kBAAkB,EAElB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,GAAG,EAEH,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAIrB;;;G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AQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CreateLayerActions, FillLayerStyle } from '../types';
|
|
2
|
+
import { Map, MapLayerMouseEvent, MapLayerTouchEvent, FilterSpecification, FillLayerSpecification } from 'maplibre-gl';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Props interface for FillLayer component
|
|
6
|
+
* Defines all configurable properties for a MapLibre GL Fill Layer
|
|
7
|
+
*/
|
|
8
|
+
interface LayerProps {
|
|
9
|
+
/** Unique identifier for the layer */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Filter expression to apply to the layer */
|
|
12
|
+
filter: FilterSpecification;
|
|
13
|
+
/** Style configuration for the fill layer */
|
|
14
|
+
style: FillLayerStyle;
|
|
15
|
+
/** Maximum zoom level for layer visibility */
|
|
16
|
+
maxzoom: number;
|
|
17
|
+
/** Minimum zoom level for layer visibility */
|
|
18
|
+
minzoom: number;
|
|
19
|
+
/** Arbitrary metadata for the layer */
|
|
20
|
+
metadata: object;
|
|
21
|
+
/** Data source for the layer */
|
|
22
|
+
source: string | object;
|
|
23
|
+
/** Source layer name for vector sources */
|
|
24
|
+
sourceLayer: string;
|
|
25
|
+
/** ID of layer before which to insert this layer */
|
|
26
|
+
beforeId: string;
|
|
27
|
+
/** Whether the layer is visible */
|
|
28
|
+
visible: boolean;
|
|
29
|
+
/** Callback function to register layer actions */
|
|
30
|
+
register: (actions: CreateLayerActions<FillLayerSpecification>, map: Map) => void;
|
|
31
|
+
}
|
|
32
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
|
|
33
|
+
visible: boolean;
|
|
34
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
|
+
touchcancel: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
36
|
+
touchend: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
37
|
+
touchstart: ((ev: any) => void) & ((ev: MapLayerTouchEvent) => void);
|
|
38
|
+
click: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
39
|
+
contextmenu: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
40
|
+
dblclick: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
41
|
+
mousemove: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
42
|
+
mouseup: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
43
|
+
mousedown: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
44
|
+
mouseout: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
45
|
+
mouseover: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
46
|
+
mouseenter: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
47
|
+
mouseleave: ((ev: any) => void) & ((ev: MapLayerMouseEvent) => void);
|
|
48
|
+
register: (actions: CreateLayerActions<FillLayerSpecification>, map: Map) => void;
|
|
49
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<LayerProps>>, {
|
|
50
|
+
visible: boolean;
|
|
51
|
+
}>>> & Readonly<{
|
|
52
|
+
onTouchcancel?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
53
|
+
onTouchend?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
54
|
+
onTouchstart?: ((ev: MapLayerTouchEvent) => any) | undefined;
|
|
55
|
+
onClick?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
56
|
+
onContextmenu?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
57
|
+
onDblclick?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
58
|
+
onMousemove?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
59
|
+
onMouseup?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
60
|
+
onMousedown?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
61
|
+
onMouseout?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
62
|
+
onMouseover?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
63
|
+
onMouseenter?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
64
|
+
onMouseleave?: ((ev: MapLayerMouseEvent) => any) | undefined;
|
|
65
|
+
onRegister?: ((actions: CreateLayerActions<FillLayerSpecification>, map: Map) => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
visible: boolean;
|
|
68
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
69
|
+
export default _default;
|
|
70
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
71
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
72
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
73
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
74
|
+
} : {
|
|
75
|
+
type: import('vue').PropType<T[K]>;
|
|
76
|
+
required: true;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
type __VLS_WithDefaults<P, D> = {
|
|
80
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
81
|
+
default: D[K];
|
|
82
|
+
}> : P[K];
|
|
83
|
+
};
|
|
84
|
+
type __VLS_Prettify<T> = {
|
|
85
|
+
[K in keyof T]: T[K];
|
|
86
|
+
} & {};
|
|
87
|
+
//# sourceMappingURL=FillLayer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FillLayer.vue.d.ts","sourceRoot":"","sources":["../../libs/components/FillLayer.vue"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,kBAAkB,EAElB,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,GAAG,EAEH,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAIrB;;;GAGG;AACH,UAAU,UAAU;IAClB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,6CAA6C;IAC7C,KAAK,EAAE,cAAc,CAAC;IACtB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,QAAQ,EAAE,CACR,OAAO,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,EACnD,GAAG,EAAE,GAAG,KACL,IAAI,CAAC;CACX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aANU,OAAO;;AAkLlB,wBAOG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { CreateGeoJsonSourceActions } from '../composables';
|
|
2
|
+
import { GeoJSONSource, GeoJSONSourceSpecification } from 'maplibre-gl';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Enhanced GeoJsonSource component props with comprehensive configuration options
|
|
6
|
+
*/
|
|
7
|
+
interface GeoJsonSourceProps {
|
|
8
|
+
/** Unique identifier for the source */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** GeoJSON data for the source */
|
|
11
|
+
data?: GeoJSONSourceSpecification['data'];
|
|
12
|
+
/** Additional source configuration options */
|
|
13
|
+
options?: Partial<GeoJSONSourceSpecification>;
|
|
14
|
+
/** Callback for registering source actions */
|
|
15
|
+
register?: (actions: CreateGeoJsonSourceActions) => void;
|
|
16
|
+
/** Enable debug logging */
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
/** Automatically cleanup resources on unmount */
|
|
19
|
+
autoCleanup?: boolean;
|
|
20
|
+
/** Error handling callback */
|
|
21
|
+
onError?: (error: any) => void;
|
|
22
|
+
/** Source load success callback */
|
|
23
|
+
onLoad?: (source: GeoJSONSource) => void;
|
|
24
|
+
/** Data update callback */
|
|
25
|
+
onDataUpdate?: (data: GeoJSONSourceSpecification['data']) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Enhanced data setter with validation and error handling
|
|
29
|
+
* @param newData - New GeoJSON data to set
|
|
30
|
+
*/
|
|
31
|
+
declare function handleSetData(newData: GeoJSONSourceSpecification['data']): void;
|
|
32
|
+
/**
|
|
33
|
+
* Enhanced cleanup function for disposing resources
|
|
34
|
+
*/
|
|
35
|
+
declare function cleanup(): void;
|
|
36
|
+
declare function __VLS_template(): {
|
|
37
|
+
default?(_: {}): any;
|
|
38
|
+
};
|
|
39
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<GeoJsonSourceProps>, {
|
|
40
|
+
data: () => {
|
|
41
|
+
type: string;
|
|
42
|
+
features: never[];
|
|
43
|
+
};
|
|
44
|
+
options: () => {};
|
|
45
|
+
debug: boolean;
|
|
46
|
+
autoCleanup: boolean;
|
|
47
|
+
}>>, {
|
|
48
|
+
sourceId: string;
|
|
49
|
+
getSource: import('vue').ShallowRef<import('..').Nullable<GeoJSONSource>>;
|
|
50
|
+
setData: typeof handleSetData;
|
|
51
|
+
removeSource: () => void;
|
|
52
|
+
refreshSource: () => void;
|
|
53
|
+
sourceStatus: Readonly<import('../composables').SourceStatus>;
|
|
54
|
+
isSourceReady: boolean;
|
|
55
|
+
isSourceRegistered: import('vue').Ref<boolean, boolean>;
|
|
56
|
+
isDataValid: import('vue').ComputedRef<boolean>;
|
|
57
|
+
lastDataUpdate: import('vue').Ref<string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties> | undefined, string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties> | undefined>;
|
|
58
|
+
cleanup: typeof cleanup;
|
|
59
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
60
|
+
register: (actions: CreateGeoJsonSourceActions) => void;
|
|
61
|
+
error: (error: any) => void;
|
|
62
|
+
load: (source: any) => void;
|
|
63
|
+
"data-update": (data: string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties>) => void;
|
|
64
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<GeoJsonSourceProps>, {
|
|
65
|
+
data: () => {
|
|
66
|
+
type: string;
|
|
67
|
+
features: never[];
|
|
68
|
+
};
|
|
69
|
+
options: () => {};
|
|
70
|
+
debug: boolean;
|
|
71
|
+
autoCleanup: boolean;
|
|
72
|
+
}>>> & Readonly<{
|
|
73
|
+
onError?: ((error: any) => any) | undefined;
|
|
74
|
+
onLoad?: ((source: any) => any) | undefined;
|
|
75
|
+
onRegister?: ((actions: CreateGeoJsonSourceActions) => any) | undefined;
|
|
76
|
+
"onData-update"?: ((data: string | import('geojson').GeoJSON<import('geojson').Geometry, import('geojson').GeoJsonProperties>) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
data: GeoJSONSourceSpecification["data"];
|
|
79
|
+
debug: boolean;
|
|
80
|
+
autoCleanup: boolean;
|
|
81
|
+
options: Partial<GeoJSONSourceSpecification>;
|
|
82
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
83
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
84
|
+
export default _default;
|
|
85
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
86
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
87
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
88
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
89
|
+
} : {
|
|
90
|
+
type: import('vue').PropType<T[K]>;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
type __VLS_WithDefaults<P, D> = {
|
|
95
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
96
|
+
default: D[K];
|
|
97
|
+
}> : P[K];
|
|
98
|
+
};
|
|
99
|
+
type __VLS_Prettify<T> = {
|
|
100
|
+
[K in keyof T]: T[K];
|
|
101
|
+
} & {};
|
|
102
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
103
|
+
new (): {
|
|
104
|
+
$slots: S;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=GeoJsonSource.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoJsonSource.vue.d.ts","sourceRoot":"","sources":["../../libs/components/GeoJsonSource.vue"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAI7E;;GAEG;AACH,UAAU,kBAAkB;IAC1B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,IAAI,CAAC,EAAE,0BAA0B,CAAC,MAAM,CA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