Migration Guide
Upgrading Leaflet to v2
Leaflet released a new major version (Leaflet v2). With the modernization comes a bunch of changes. If you use leaflet directly in your code make sure to follow the leaflet migration guide.
Upgrading the vue-leaflet wrapper
Major Changes
- core: remove
WINDOW_OR_GLOBALfromutils - core: remove
useGlobalLeaflet- is not necessary with leaflet v2 and ESM support
- core: remove type
Datafromutils - core:
crsvalue inLMapnow needs to be a value ofCRSclass - interactiveLayer: rename
bubblingMouseEventstobubblingPointerEvents, see Leaflet v2- also applies to
Path,Polyline,Polygon,CircleMarker,Circle
- also applies to
- deprecate unreachable code (see #56)
- utils: deprecate
resetWebpackIcon(Leaflet 2 default icons are inline SVGs and PNG assets are no longer used) - config: remove experimental flag
useResetWebpackIcon - icon: remove invalid DOM event listeners from
LIcon(LeafletIconandDivIconinstances do not implementEventTarget; events should be bound onLMarkeror directly on elements inside theLIcontemplate slot) - types: remove
IMapBlueprint - types: Leaflet 2 now provides native TypeScript types (
@types/leafletshould be removed); several component prop and method types have been updated to match Leaflet 2 typings
New Components
Two new components have been added:
LSVGOverlayLVideoOverlay
Plugin support
Check out vue-leaflet-plugins for the new plugin support.