leaflet-extra-polyline

1.0.2 • Public • Published

Leaflet Extra Polyline

Renders a polyline with a pattern

image

Code example

const map = L.map('map').setView([55.7422, 37.5719], 13);

const tiles = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
	maxZoom: 19,
	attribution: '© OpenStreetMap'
}).addTo(map);

const polyline = L.extraPolyline({
    pattern: [[0.0, 0.0], [12.0, 3.0], [0.0, 6.0]],
    distance: 20,
    shapeScale: 1,
    shapeColor: '#d26161',
    shapeZIndex: 1000,
    color: '#ffb0b0',
    opacity: 1,
    weight: pathWeight,
    stroke: true,
    lineCap: 'round',
    lineJoin: 'round',
    smoothFactor: 3,
    className: 'map-track-line',
});

polyline.setLatLngs(latLngs);

polyline.addTo(map);

Package Sidebar

Install

npm i leaflet-extra-polyline

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

4.92 kB

Total Files

5

Last publish

Collaborators

  • djonnyx