Skip to content

Draws a Bézier line between two points with an animated flight object.

Notifications You must be signed in to change notification settings

lifeeka/leaflet.bezier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet Bezier

Create bezier with leaflet

Installation

npm i leaflet.bezier --save

Usage

    var options = {
        color: 'rgb(145, 146, 150)',
        fillColor: 'rgb(145, 146, 150)',
        dashArray: 8,
        opacity: 0.8,
        weight: '1',
        iconTravelLength: 0.5, //How far icon should go. 0.5 = 50%
        iconMaxWidth: 50,
        iconMaxHeight: 50,
        fullAnimatedTime: 7000,// animation time in ms
        easeOutPiece: 4, // animation easy ou time in ms
        easeOutTime: 2500, // animation easy ou time in ms
    };

    L.bezier({
        path: [
            [
                {lat: 7.8731, lng: 80.7718},
                {lat: -18.7669, lng: 46.8691},
            ]
        ],

        icon: {
            path: "plane.png"
        }
    }, options).addTo(map);

Demo

alt text

npm run start

License

This project is licensed under the MIT License

About

Draws a Bézier line between two points with an animated flight object.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published