Skip to content

Commit b16d6b8

Browse files
author
Nicolò Maria Mezzopera
committed
chore: add zoom snap to simple example
1 parent 74490e8 commit b16d6b8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/src/components/Simple.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<l-map
1010
:zoom="zoom"
1111
:center="center"
12+
:options="mapOptions"
1213
style="height: 80%"
1314
@update:center="centerUpdate"
1415
@update:zoom="zoomUpdate">
@@ -47,9 +48,12 @@ export default {
4748
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
4849
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
4950
marker: L.latLng(47.413220, -1.219482),
50-
currentZoom: 13,
51+
currentZoom: 11.5,
5152
currentCenter: L.latLng(47.413220, -1.219482),
52-
showParagraph: false
53+
showParagraph: false,
54+
mapOptions: {
55+
zoomSnap: 0.5
56+
}
5357
};
5458
},
5559
methods: {

0 commit comments

Comments
 (0)