Today I released the initial version of a Vue2Leaflet plugin to provide a simple wrapper of the polyline measurement tool as a Vue2Leaflet plugin, via the vue2-leaflet-polyline-measure component. Usage is simple:
<l-map> <l-polyline-measure :options="{ showUnitControl: true }" position="bottomright"/> <!-- other map components --> </l-map>
The options object is passed directly to the underlying library, so can be any of the polyline measurement options. The position parameter places the control in a corner of the map based on the available Leaflet control options.
]]>