var decorator = L.polylineDecorator(polyline, { patterns: [ // defines a pattern of 10px-wide dashes, repeated every 20px on the line {offset: 0, repeat: 20, symbol: L.Symbol.dash({pixelSize: 10})} ] }).addTo(map);