You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://gitter.im/Vue2Leaflet/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Vue2Leaflet is a JavaScript library for the [Vue](https://vuejs.org/) framework that wraps [Leaflet](http://leafletjs.com/) making it easy to create reactive maps.
22
+
23
+
24
+

25
+
26
+
## Documentation
27
+
[Go here](https://korigan.github.io/Vue2Leaflet/) to check out live examples and docs.
28
+
29
+
If you want to hack around, here is a [JS Fiddle](https://jsfiddle.net/Boumi/k04zpLx9/) to get started
30
+
### :warning: Breaking changes from v1.x.x to v0.x.x :warning:
31
+
A new major release v1.x.x is available and come with some breaking changes.
32
+
#### :exclamation: Components names
33
+
As some component where conflicting with reserved name like Circle with SVG Circle, from v1.x.x all components are prefixed with L.
34
+
35
+
For example Marker component became LMarker (l-marker in template).
36
+
#### :exclamation: Events names
37
+
Event handling have been simplified and are now mapped directly to Leaflet event.
38
+
39
+
For example Marker move event was 'l-move' and became simply 'move'.
40
+
#### :sparkles: Leaflet Controls
41
+
v1.0.0 introduces Leaflet Controls you can now use them using LControlAttribution, LControlLayers, LControlScale and LControlZoom.
42
+
43
+
When adding LControlAttribution or LControlZoom to your template, remember to desactivate the default one by using LMap options:
35
44
```javascript
36
-
newVue({ el:'#app'});
45
+
{
46
+
zoomControl:false,
47
+
attributionControl:false
48
+
}
37
49
```
38
-
39
-
Make sure the leaflet.css is included, either via a HTML link tag or in your vue component style
40
-
41
-
```css
42
-
@import"~leaflet/dist/leaflet.css";
43
-
```
44
-
Here is the result
45
-
46
-

### If you want to try it here is a [JS Fiddle Hello Map of the World](https://jsfiddle.net/Boumi/k04zpLx9/)
53
-
50
+
Otherwise you will end up with two zoom/attribution control)
54
51
## How to install
55
-
56
52
```bash
57
53
$ npm install vue2-leaflet --save
58
54
```
59
-
60
-
## List of currently implemented components
61
-
62
-
-[x] Map
63
-
-[x] Marker
64
-
-[x] Popup
65
-
-[x] Tooltip
66
-
-[x] TileLayer
67
-
-[x] TileLayer.WMS
68
-
-[x] ImageOverlay
69
-
-[x] Polyline
70
-
-[x] Polygon
71
-
-[x] Rectangle
72
-
-[x] Circle
73
-
-[x] CircleMarker
74
-
-[x] LayerGroup
75
-
-[ ] FeatureGroup
76
-
-[x] GeoJSON
77
-
78
-
## Build Setup
79
-
80
-
```bash
81
-
# Once you have cloned this repo, install dependencies
82
-
$ npm install
83
-
84
-
# build for development and production with minification
85
-
$ npm run build
86
-
87
-
```
55
+
For more detailed informations you can follow the [Quick Start Guide](https://korigan.github.io/Vue2Leaflet/)
88
56
## Leaflet Plugins
89
-
This repo is a wrapper for Leafet and VueJs. I want to keep it as simple as possible so I don't want to add any plugin support into this repo.
90
-
91
57
Leaflet plugins can easily work with Vue2Leaflet, if you want to use one I would recommand to look at the awesome work made by the community in the list below.
*[vue2-leaflet-markercluster](https://github.com/jperelli/vue2-leaflet-markercluster) wrapper for [MarkerCluster](https://github.com/Leaflet/Leaflet.markercluster)
61
+
*[vue2-leaflet-tracksymbol](https://github.com/ais-one/vue2-leaflet-tracksymbol) wrapper for [TrackSymbol](https://github.com/lethexa/leaflet-tracksymbol)
62
+
*[vue-choropleth](https://github.com/voluntadpear/vue-choropleth) to display a choropleth map given a certain GeoJSON
63
+
*[vue2-leaflet-geosearch](https://github.com/fega/vue2-leaflet-geosearch) wrapper for [GeoSearch](https://github.com/smeijer/leaflet-geosearch)
64
+
*[vue2-leaflet-vectorgrid](https://github.com/tesselo/vue2-leaflet-vectorgrid) wrapper for [VectorGrid](https://github.com/Leaflet/Leaflet.VectorGrid) to display gridded vector data
98
65
99
66
If you have created a plugin and want it to be listed here, let me know :-).
100
67
68
+
Vue2Leaflet is only a wrapper for Leaflet. I want to keep it as simple as possible so I don't want to add any plugin support into this repo.
0 commit comments