Skip to content

ayemaung/Leaflet.TextPath

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet.TextPath

Shows a text along a Polyline.

Check out the demo !

Usage

For example, show path orientation on mouse over :

    var layer = L.polyLine(...);
    
    layer.on('mouseover', function () {
        this.setText('  ►  ', {repeat: true, attributes: {fill: 'red'}});
    });

    layer.on('mouseout', function () {
        this.setText(null);
    });

Screenshot

screenshot

Credits

The main idea comes from Tom Mac Wright's Getting serious about SVG

Authors

Makina Corpus

About

Show text along Polyline with Leaflet

Resources

License

Stars

Watchers

Forks

Packages

No packages published