Vue2Leaflet

Vue 2 components for Leaflet maps

Github星跟踪图

Vue2Leaflet

All Contributors

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

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 two breaking changes:

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

Documentation

Go here to check out live examples and docs.

Leaflet Plugins

Vue2Leaflet has a wide array of plugins written by the community! Check Here

Contribute

# clone the repository
git clone https://github.com/vue-leaflet/Vue2Leaflet.git
cd Vue2Leaflet
# install dependencies and build vue2-leaflet
npm install
# Compile the source and start the documentation server
npm run dev

Go to http://localhost:8080/ to see the docs and the examples

Any changes to the source code is reflected in the docs after a handfuls of seconds.

Authors

  • Mickaël Bouchaud
  • Nicolò Maria Mezzopera

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

Contributors

If you believe you should be on this list please add yourself by typing this on a PR or issue: @all-contributors please add @yourNickname for X where X is one of all-contributors emojoi keys

And all the rest who contributed

License

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

主要指标

概览
名称与所有者vue-leaflet/Vue2Leaflet
主编程语言JavaScript
编程语言Vue (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2016-10-04 20:47:13
推送于2024-10-29 14:23:03
最后一次提交2024-07-11 00:26:22
发布数90
最新版本名称v2.7.1 (发布于 2021-06-27 19:00:22)
第一版名称v0.0.2 (发布于 2016-10-05 01:47:16)
用户参与
星数2k
关注者数38
派生数377
提交数1.1k
已启用问题?
问题数501
打开的问题数32
拉请求数190
打开的拉请求数9
关闭的拉请求数46
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?