lwsu / leaflet-polygon-fillPattern

Extend the Polygon Object to set an image to fill the path in SVG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

leaflet-polygon-fillPattern

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

Check out the demo.

Requirements

  • Leaflet 1+ (Leaflet 0.7 or earlier, check out here)

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);

About

Extend the Polygon Object to set an image to fill the path in SVG

License:MIT License


Languages

Language:JavaScript 79.6%Language:HTML 20.4%