Leaflet 地图的 Vue 组件
Vue 3 components for building Leaflet maps with a declarative component API.
vueleaflet wraps common Leaflet map primitives as Vue components, so maps can be composed with familiar templates, props, slots, and events. It is inspired by react-leaflet and vue-google-maps.
LLayerGroup and LFeatureGroup.vp scripts for dev, build, and test.npm install vueleaflet vue leafletLeaflet CSS is required in your app entry:
import 'leaflet/dist/leaflet.css';
| Category | Components |
|---|---|
| ️ Map | LMap, LPane |
| ️ Layer containers | LLayerGroup, LFeatureGroup |
| Raster layers | LTilelayer, LTileLayer, LTileLayerWMS |
| Marker/overlays | LMarker, LPopup, LTooltip, LImageOverlay, LVideoOverlay, LSVGOverlay |
| Vector layers | LCircle, LCircleMarker, LPolygon, LPolyline, LRectangle, LGeojson |
| ️ Controls | LControl, LControlAttribution, LControlLayers, LControlScale, LControlZoom |
See docs/components.md for the full props and events reference.
Reset view
# install dependencies
pnpm install
# run the example app
pnpm dev
# run unit tests
pnpm test
# build the library
pnpm build
# build the example app
pnpm build:example
# verify distribution artifacts
pnpm check:distPull requests are welcome. For component changes, please include focused tests and update the relevant docs or examples.
暂无开放 Issues,或尚未同步最近议题。