I'm using Leaflet to create a map of movements of a species of interest. I'm using polylineDecorator to draw arrows, but I would like to have a bi-directional arrow (example in figure below).
Right now my code for a single arrowhead looks like that:
function pop_Seasonal_0(feature, layer) {
var PD1 = L.polyline(layer.getLatLngs(), {
color: "#8B0000",weight: 5,opacity: 1,dashArray: '4,12,20,12'
}).addTo(layer_Seasonal_0);
L.polylineDecorator(PD1, {
patterns: [{
offset: '110%',
repeat: 0,
symbol: L.Symbol.arrowHead({
pixelSize: 20,
pathOptions: {
color: "#8B0000",
fillOpacity: 1,
weight: 0
}
})
}]
}).addTo(layer_Seasonal_0);
}
Is there a way to do it?