Skip to content
Vue 2 components for Leaflet maps
Branch: master
Clone or download
DonNicoJs Merge pull request #376 from bezany/test/LMarker_demo
worked test for LMarker with parent LMap
Latest commit 416df68 Apr 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs feat: add ready events to the docs Apr 20, 2019
examples lint: self closing tag on img Apr 20, 2019
src feat: add ready event to all components Apr 20, 2019
tests/unit added test for LMarker Apr 22, 2019
types Type definitions for v2.0.x Mar 5, 2019
.babelrc feat: add jest config and configure needed command to run jest in CI … Mar 1, 2019
.browserslistrc feat: move build system to bili Jan 30, 2019
.eslintignore feat: move build system to bili Jan 30, 2019
.eslintrc.js feat: move to vue cli 3.0 as dev system configure it Nov 16, 2018
.gitignore chore: add coverage folder to gitignore Mar 1, 2019
.gitlab-ci.yml chore: remove deply from gitlab config Apr 20, 2019
.travis.yml feat: add jest config and configure needed command to run jest in CI … Mar 1, 2019 Simplify event handling no 'l-[event-name] required Mar 24, 2018
LICENSE Fix license file Mar 17, 2017
package.json 2.1.0 Apr 21, 2019
rollup.config.js fix: proper global scope for leaflet in umd build Mar 1, 2019


Downloads Downloads Version License Gitter

Coverage Status

Vue2Leaflet is a JavaScript library for the Vue framework that wraps Leaflet making it easy to create reactive maps.

Image of Map

How to install

npm install vue2-leaflet leaflet --save

For more detailed information you can follow the Quick Start Guide

Breaking change from 1.x.x to 2.x.x

A new major release 2.0,0 is available and come with one breaking change:

Leaflet is not automatically installed anymore

Leaflet is now a peerDependency and need to be installed manually, we updated our docs to reflect this but please pay attention when migrating

Importing the library in Webpack / Rollup

Now the code of vue2-leaflet is split component by component (while using a bundler like Webpack/Rollup/Parcel) to do so the following syntax is not working anymore:

import Vue2Leaflet from 'vue2-leaflet' // INVALID

And has been replaced by

import * as Vue2Leaflet from 'vue2-leaflet' // VALID

Is highly suggested to import only the needed modules by doing so:

import {LMap, LTileLayer, LMarker} from 'vue2-leaflet'

This will reduce the size of the bundle significantly


Go here to check out live examples and docs.

If you want to hack around, here is a JS Fiddle to get started

Leaflet Plugins

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.

Vue2Leafet plugins

If you have created a plugin and want it to be listed here, let me know :-).

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.


Mickaël Bouchaud

Inspired by many map wrapper (google and leaflet) for many framework (React, Angular and Vue 1.0)


Thanks goes to these wonderful people


This project is licensed under the MIT License - see the LICENSE file for details

You can’t perform that action at this time.