Leaflet Extra Polyline
Renders a polyline with a pattern
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);