src/L.PolylineDecorator.js
function(latLngs, pattern) {
        if (latLngs.length < 2) {
            return [];
        }
        const pathAsPoints = latLngs.map(latLng => this._map.project(latLng));
        return projectPatternOnPointPath(pathAsPoints, pattern)
            .map(point => ({
                latLng: this._map.unproject(L.point(point.pt)),
                heading: point.heading,
            }));
    }
function(latLngs, pattern) {
        if (latLngs.length < 2) {
            return [];
        }
        const pathAsPoints = latLngs.map(latLng => this._map.project(latLng));
        return projectPatternOnPointPath(pathAsPoints, pattern)
            .map(point => ({
                latLng: this._map.unproject(L.point(point.pt)),
                heading: point.heading,
            }));
    }
function ( latLngs , pattern ) { if ( latLngs . length < 2 ) { return [ ] ; } const pathAsPoints = latLngs . map ( latLng => this . _map . project ( latLng ) ) ; return projectPatternOnPointPath ( pathAsPoints , pattern ) . map ( point => ( { latLng : this . _map . unproject ( L . point ( point . pt ) ) , heading : point . heading , } ) ) ; }
Compute pairs of LatLng and heading angle,
that define positions and directions of the symbols on the path
Compute pairs of LatLng and heading angle that define positions and directions of the symbols on the path