3

I'm new to Leaflet and mapping. I'm currently looking for solutions to how I can autogenerate a line pattern inside a polygon drawn on the map with a pre defined distance between each line.

Does anyone have any suggestion to how I can achieve this?

1 Answer 1

6

This Leaflet plugin lets you do exactly that:

Leaflet.pattern
Provides the ability to use SVG patterns as backgrounds for Leaflet Paths.

Options include:

  • X Offset
  • Y Offset
  • Width
  • Height
  • Angle

From the stripe pattern example:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.