Leaflet.pattern icon indicating copy to clipboard operation
Leaflet.pattern copied to clipboard

Add legend

Open renatobecker-zz opened this issue 9 years ago • 3 comments

Hi,

How can I add L.StripePattern as a legend item? Thanks.

renatobecker-zz avatar Sep 14 '16 14:09 renatobecker-zz

Create a simple .png file and add this to your legend:

background-image: url('./path/to/stripes.png'); background-repeat: repeat;

A1rPun avatar Sep 08 '17 09:09 A1rPun

Create a simple .png file and add this to your legend:

background-image: url('./path/to/stripes.png'); background-repeat: repeat;

Could you explain how this would be done? How can you create the png file from a pattern?

JamesWaldron avatar Oct 09 '19 18:10 JamesWaldron

@JamesWaldron You can find one on your favorite search engine with keywords like stripes tiled, make sure to search for transparent images. There are also some generators out there so you can choose color, direction, etc.

Do note that this is just mimicking the style of L.StripePattern. I hope this answer your questions

A1rPun avatar Oct 09 '19 23:10 A1rPun