File tree Expand file tree Collapse file tree 6 files changed +2949
-156
lines changed Expand file tree Collapse file tree 6 files changed +2949
-156
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "git" : {
3
+ "commitMessage" : " chore: release v${version}"
4
+ },
5
+ "github" : {
6
+ "release" : true
7
+ }
8
+ }
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import L from ' leaflet'
3
+ import { PropType , inject , nextTick } from ' vue' ;
4
+ import { MAP_PROVIDE , getMapInjectKey , type MapProvide } from ' ../src' ;
5
+
6
+
7
+ const mapProvide = inject <MapProvide >(MAP_PROVIDE );
8
+
9
+ const key = getMapInjectKey ();
10
+
11
+ const props = defineProps ({
12
+ options: {
13
+ type: Object as PropType <L .Control .ZoomOptions >,
14
+ required: false
15
+ }
16
+ })
17
+
18
+ nextTick (() => {
19
+ const zoom = L .control .zoom (props .options );
20
+ mapProvide ?.getMap (key )?.addControl (zoom );
21
+ })
22
+
23
+ </script >
24
+
25
+ <template ></template >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import {
18
18
} from " ../src" ;
19
19
import " ../node_modules/leaflet/dist/leaflet.css" ;
20
20
import L from " leaflet" ;
21
- // import { type GeoJsonObject } from 'geojson ';
21
+ import LCustomPlugin from ' ./LCustomPlugin.vue ' ;
22
22
23
23
const mapOptions = {
24
24
zoom: 13 ,
@@ -69,12 +69,14 @@ const tmpGeojson = {
69
69
}
70
70
};
71
71
72
+
73
+
72
74
</script >
73
75
74
76
<template >
75
77
<div >
76
78
<h1 >Basic UI Layers</h1 >
77
- <l-map id =" map1" :options =" mapOptions" >
79
+ <l-map id =" map1" :options =" mapOptions" ref = " map1 " >
78
80
<l-tilelayer
79
81
urlTemplate =" https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}"
80
82
:options =" tileLayerOptions"
@@ -189,6 +191,19 @@ const tmpGeojson = {
189
191
<LGeojson :geojson =" tmpGeojson" />
190
192
</l-map >
191
193
</div >
194
+ <div >
195
+ <h1 >Custom Plugin</h1 >
196
+ <l-map
197
+ id =" map5"
198
+ :options =" mapOptions"
199
+ >
200
+ <l-tilelayer
201
+ urlTemplate =" https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}"
202
+ :options =" tileLayerOptions"
203
+ />
204
+ <LCustomPlugin />
205
+ </l-map >
206
+ </div >
192
207
</template >
193
208
194
209
<style lang="css">
@@ -200,7 +215,8 @@ const tmpGeojson = {
200
215
#map1 ,
201
216
#map2 ,
202
217
#map3 ,
203
- #map4 {
218
+ #map4 ,
219
+ #map5 {
204
220
height : 300px ;
205
221
}
206
222
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vueleaflet" ,
3
- "version" : " 3.0.2 " ,
3
+ "version" : " 3.0.1 " ,
4
4
"type" : " module" ,
5
5
"files" : [" dist" ],
6
6
"main" : " ./dist/vueleaflet.umd.js" ,
30
30
"@vitejs/plugin-vue" : " ^4.3.4" ,
31
31
"typescript" : " ^4.5.4" ,
32
32
"vite" : " ^4.4.9" ,
33
- "vue-tsc" : " ^1.8.13"
33
+ "vue-tsc" : " ^1.8.13" ,
34
+ "release-it" : " ^16.1.0"
34
35
},
35
36
"publishConfig" : {
36
37
"registry" : " https://registry.npmjs.org/"
You can’t perform that action at this time.
0 commit comments