Skip to content

creates hatched fill classes for svg polygons to be used with Leaflet

License

Notifications You must be signed in to change notification settings

samanbey/leaflet-hatchclass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-hatchclass

creates hatched fill classes for svg polygons to be used with Leaflet

How to use

see in example.html

  • include leaflet-hatchclass.js
  • create hatch filled CSS classes using the L.hatchClass() function
  • pass the resulting class names in the styling function to className property of features

parameters

L.hatchClass(<Array>colors, <Number>strokeWidth, <Number>angle)

  • colors: array of CSS colors or array of { color, width } objects. Default: ['black', 'white']
  • strokeWidth: in pixels; defaults to 6
  • angle: in degrees; defaults to 45

live demo

https://samanbey.github.io/leaflet-hatchclass/example.html

About

creates hatched fill classes for svg polygons to be used with Leaflet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published