• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vue components for Leaflet maps

vue-leaflet

Here is Vue components for Leaflet maps, which is inspired by react-leaflet and vue-google-maps.

A vue component for leaflet.js

This branch adapts with vue 2.0, vuex 2.0 and leaflet 1.0.3.

Completion of components

  • Map
  • Marker
  • Popup
  • Tooltip
  • TileLayer

Installation

npm install vueleaflet -save

Startup

You can input some Vue-styled components in a .vue file in order to use leaflet.js, like Layout.vue.

<l-map :zoom="zoom" :center="center" :min-zoom="minZoom" :max-zoom="maxZoom">
  <l-tilelayer :url="url" :attribution="attribution"></l-tilelayer>
  <l-marker :position="center" :title="title" :opacity="opacity" :draggable="draggable">
    <l-tooltip content="a tooltip"></l-tooltip>
  </l-marker>
  <l-marker :position="marker" :title="title" :opacity="opacity" :draggable="false">
    <l-popup content="a popup"></l-popup>
  </l-marker>
</l-map>

Before that, you should config the vuex, see main.js

import Vue from 'vue';
import Vuex from 'vuex';
import VueLeaflet from './index'
import App from './Layout';

Vue.use(Vuex);

const store = new Vuex.Store({});

Vue.use(VueLeaflet.plugin,store);

new Vue({
  el: '#app',
  store,
  template: '<App/>',
  components: { App },
});

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run all tests
npm test

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

Contribute

All the developments are on the develop branch, while the stable version is on the master branch.

License

MIT

More Repositories

1

pyMap

Raster Map Download Helper
Python
88
star
2

geojson-python-utils

Python helper functions for manipulating GeoJSON
Python
87
star
3

pb-to-typescript

A converter from pb to typescript
HTML
77
star
4

leaflet.marker.highlight

Highlight performance for L.marker
JavaScript
62
star
5

leaflet-geojson-vt

A plugin combining geojson-vt with leafletjs
JavaScript
40
star
6

weapp-i18n

A i18n package for weapp.
JavaScript
34
star
7

pyMap_webapp

A webapp version for Raster Map Download Helper
JavaScript
33
star
8

psm

Pypi Source Manager: fast switch between different Pypi Source: Pypi, double, aliyun
Python
31
star
9

example-vue-webpack

An example for vue and webpack
JavaScript
29
star
10

mpa

A vue template for multipage project
JavaScript
27
star
11

svelte-webpack-mpa

A template to create multi-page application powered by webpack
JavaScript
23
star
12

weapp-weatherfine

A weapp for weather forecast
JavaScript
22
star
13

vue-leaflet-mobile

A vue mobile webapp for leaflet.js
JavaScript
17
star
14

wgis-kit

MapViewer for WGS84. GCJ, baidu coordinates
JavaScript
16
star
15

svelteup

web component + svelte + esbuild = svelteup
TypeScript
15
star
16

leaflet.geoJsonFilter

A leafletjs plugin to filter geojson marker based on its properties
JavaScript
14
star
17

weapp-map

A map demo for qq map, baidu map, amap on the weapp platform
JavaScript
12
star
18

example-vue-workbox

An example for vue and workbox-sw
JavaScript
11
star
19

example-nextjs

使用Next.js实现React SSR的优雅降级
JavaScript
9
star
20

vue-leaflet-sync

A demo to make leaflet-sync system by vue.js framework
JavaScript
9
star
21

example-requests

Example to learn python-requests
Python
9
star
22

Spatialite2GeoJSON

Convert Spatialtie into GeoJson data on the .NET platform
C#
8
star
23

leaflet-pip-v2

A leafletjs plugin to select points in a polygon
JavaScript
7
star
24

vike-svelte

🚧 WIP 🔨 Svelte integration for Vike
JavaScript
6
star
25

nodemap_spider

A Spider for web map
JavaScript
6
star
26

selenium_apscheduler_example

A example to use selenium and apscheduler
Python
5
star
27

weapp-handsome

A weapp to determine who is more handsome
JavaScript
5
star
28

multipage-parcel

HTML
4
star
29

keynote

FE Tech Sharing keynote
HTML
4
star
30

leaflet-player

A player to present geojson in a time series
JavaScript
4
star
31

GIS_blog

Table of Content for my GIS blog
4
star
32

POI_Finder

A Finder for POI in webgis
Python
4
star
33

pyQGIS-WGS2GCJ

An example for pyQGIS to convert shapefile from WGS84 coordinate to GCJ
Python
4
star
34

svelte-ssr

A demo to build ssr in a very simple mode powered with svelte
JavaScript
4
star
35

bundlelook

TypeScript
3
star
36

mpa-pwa

A template for vue project with mpa and pwa
JavaScript
2
star
37

ts-lib-starter

A simplest starter template for typescript lib
TypeScript
2
star
38

nodemap

A electron app for nodemap_spider
JavaScript
2
star
39

vite-antd-mobile-starter

A simplest template to build mobile web project with vite + react + antd-mobile
TypeScript
2
star
40

pyMap_GFW

Raster Map Download Helper through GFW
Python
2
star
41

example-svelte-spring

HTML
2
star
42

brandonxiang

2
star
43

rc-gantt-chart

web gantt powered by react
TypeScript
2
star
44

blog

Stay foolish. Stay hungry
CSS
2
star
45

vite-antd-starter

A simplest template to buil admin portal project with vite + react + antd
TypeScript
2
star
46

blog-weapp

JavaScript
1
star
47

cv

My cv produced by photoshop
1
star
48

ssr-pwa

A template for vue project with ssr and pwa based on lavas
JavaScript
1
star
49

geojsonCoordTransform

把geojson数据从wgs84转换到国测局坐标
JavaScript
1
star
50

iframe-height

A research to get height of iframe
HTML
1
star
51

uniapp-tauri

A template for uniapp and tauri
TypeScript
1
star
52

weapp-handsome-backend

A backend for weapp-handsome
Python
1
star
53

svelteup-starter

A simple starter with svelteup
CSS
1
star
54

module-federation

1
star
55

umami

JavaScript
1
star
56

actions-docup

A github action for docup
TypeScript
1
star
57

example-pnpm-monorepo

JavaScript
1
star
58

example-single-spa-vue

An example for micro frontend powered by single-spa
JavaScript
1
star
59

astro-react-antd

A simple template to create template with astro + react + antd
TypeScript
1
star
60

go-web

Go
1
star
61

vite-antd-ssr

TypeScript
1
star
62

example-nhibernate-spatial

An example for nhibernate spatial
C#
1
star
63

componentlook

detect how many different writing style in your project
JavaScript
1
star
64

mobile-page

1
star
65

manifest-parser

A parser for app manifest and some utils to determine whether the website is a pwa
TypeScript
1
star
66

Leaflet.PictureMarker

A plugin for leaflet1.0 to show a picture marker by L.Canvas
JavaScript
1
star
67

example-webassembly

examples for webassembly
Rust
1
star
68

repro-rn63-pnpm

Java
1
star
69

chrome-extension-svelte

A template for chrome extension starter powered by svelteup
Svelte
1
star
70

serverless-next.js-tencent

⚡ Deploy your next apps using the serverless framework on Tencent Cloud
JavaScript
1
star