Extend the Polygon Object to set an image to fill the path in SVG
JavaScript HTML
Pull request Compare This branch is 4 commits ahead of lwsu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
LICENSE
README.md
leaflet-polygon.fillPattern.js

README.md

leaflet-polygon-fillPattern

Extend the Polygon Object to fill SVG Path element with an image pattern.

Check out the demo.

Usage example

var poly1 = [
    [24, 121],
    [24.5, 121],
    [24.5, 121.9],
    [24, 121.9]
];
L.polygon(poly1, {fill:'url(image.gif)'}).addTo(map);