{"_id":"leaflet.pattern","_rev":"1-75adfa26ded12436cd47e5c7366abe5d","name":"leaflet.pattern","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"leaflet.pattern","version":"0.1.0","description":"Provides the ability to use SVG patterns as backgrounds for Leaflet Paths.","dependencies":{"leaflet":"~0.7.1"},"devDependencies":{"uglify-js":"~2.3.6"},"main":"dist/leaflet.pattern.js","keywords":["gis","map"],"gitHead":"44c567802404659bd165bf502ae9aa81071ebd4c","_id":"leaflet.pattern@0.1.0","_npmVersion":"6.2.0","_nodeVersion":"10.4.1","_npmUser":{"name":"pixelized_peanut","email":"pixelized_peanut@icloud.com"},"dist":{"integrity":"sha512-E4sxvvK0XHi1EhE1yUTG1bzafXZoXUPqWPjHz5fSpv/pOcT4CtS0qR1lhFSRtSUYios8OwlZmUGB9n91zQEgcw==","shasum":"c127ac80915b7aa3f450f97fe08c06e7215eb8a7","tarball":"https://registry.npmjs.org/leaflet.pattern/-/leaflet.pattern-0.1.0.tgz","fileCount":31,"unpackedSize":224643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZxEwCRA9TVsSAnZWagAA6oUP/jIDq/VLCD5gmalOXoXT\nBFazd0T25bo2kwpHD0Xa2tzTCYlfx9wKCmAvfoG6yPkgcDkRvylENjbyGyno\nUz+tvLv2emxfPgHaEBwIBZoxGNbQ7Dr7n8zhrRyyCOPCOfgNTh0ROIES2Oo1\nLkxyEKGXP18JMgeuLl4fM7EwZJW76YCMzLc6XyCQrhF8ShFgcZFuvTzrf8NT\nvPL3PNonqtJXfWmThyWwhuxpVQwFf31v/g/fu56O3aMc0JmWpfURocZis/uK\nU1dTIBRmHZNLubG/mygW+pJs15HyoyjkOyyFuoUUTJ/wTFpfs6NgLC/sOLJc\nLmSskUOvfdKKGcdxiXS5oJ29UfF8Ku+2B/1pM9YkFIiPfMiMHsRSru833Dlr\nJ7oFbgbKb0i7NEixJ9Z5VT0X8jkIR7h2TUDSia9b+Ql/oLAkA/XpmRbsXV6O\n1FRFyXStWXXoQ9pVX3cZlzEZheOZ13kP6T1zUjL7IP4QotqL0vEDyW7ai8YS\nBETRP0aBmN95mOl1jEHgUt9vc+v6qM+BlsOhFhN4AMdGYEs98yH7Y9Jko8Ec\n0GL7aaA8IiWtdm+ZNbj8KRTe8MgyYGoGyfWQ72myvJXldoVQIa4xuqEizslS\nqSBDuGx40Mm9RdLY7RKgyTYSAQjTxymZa7gkDTFEvGoc+8OnUEdwaWikdM/h\nm+oG\r\n=AOES\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtrEmKkVQzIvELBhI/9E2TlE6+n3XzDaabxmeLEH9qIAiA3tkRCGxB4OIY0VbOa8efnVyozrE04qC9EV2ymNJzPxQ=="}]},"maintainers":[{"name":"pixelized_peanut","email":"pixelized_peanut@icloud.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet.pattern_0.1.0_1533481264306_0.7560162950823752"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-05T15:01:04.305Z","0.1.0":"2018-08-05T15:01:04.428Z","modified":"2022-05-07T18:48:36.189Z"},"maintainers":[{"name":"pixelized_peanut","email":"pixelized_peanut@icloud.com"}],"description":"Provides the ability to use SVG patterns as backgrounds for Leaflet Paths.","keywords":["gis","map"],"readme":"Leaflet.pattern\n===============\n\nProvides the ability to use SVG patterns as backgrounds for [Leaflet](http://leafletjs.com) Paths.\n\n*Requires Leaflet 0.7.0 or newer.*\n\n\nUsage Examples\n==============\n\n* [Circle Pattern](https://teastman.github.io/Leaflet.pattern/pattern-circle.html)\n* [Rectangular Pattern](https://teastman.github.io/Leaflet.pattern/pattern-rect.html)\n* [Stripe Pattern](https://teastman.github.io/Leaflet.pattern/pattern-stripes.html)\n* [Path Pattern](https://teastman.github.io/Leaflet.pattern/pattern-path.html)\n* [GeoJson Pattern](https://teastman.github.io/Leaflet.pattern/pattern-geojson.html)\n\nYou can define a pattern in 2 ways.\n1. Using a pre-defined provided pattern.\n2. Creating a custom pattern.\n\n\nIn either case the Pattern object needs to be initialized.  This can be done as follows.\n\n<code>\nvar pattern = new L.Pattern({options});\n</code>\n\n**Options**\nAll custom and pre-defined patterns can make use of the following options.\n\n* **patternUnits**: {userSpaceOnUse | objectBoundingBox} (default: userSpaceOnUse) - Defines if the x, y, width, and height values are measured against the current user coordinate system, or are in the range of 0.0 - 1.0 as a percentage of the bounding box of their parent element. \n* **patternContentUnits**: {userSpaceOnUse | objectBoundingBox} (default: userSpaceOnUse) - Similar to patternUnits but applies to the shapes within the pattern. \n* **x**: {number} (default: 0) - The x offset of the pattern starting position. \n* **y**: {number} (default: 0) - The y offset of the pattern starting position. \n* **width**: {number} (default: 8) - The width of the pattern. \n* **height**: {number} (default: 8) - The height of the pattern. \n* **patternTransform**: {string} (default: null) - see http://www.w3.org/TR/SVG/coords.html#TransformAttribute. \n* **angle**: {number} (default: null) - a quick way to add rotate(angle) to the patternTransform. \n\n\nPre-Built Patterns\n------------------\n\nPre-Built patterns are just an easier way to use some common patterns.  Pre-Built patterns typically have their own special options, but all can use the base options mentioned above.\n\n### Stripes\n\n<code>\nvar stripes = new L.StripePattern({options});\nstripes.addTo(map);\n</code>\n\n**Options**\n\n* **weight**: {number} (default: 4) - The width of the primary stripe. \n* **spaceWeight**: {number} (default: 4) - The width of the secondaty stripe, typically an empty space. \n* **color**: {color} (default: #000000) - The color of the primary stripe. \n* **spaceColor**: {color} (default: #ffffff) - The color of the secondary stripe. \n* **opacity**: {0.0 - 1.0} (default: 1.0) - The opacity of the primary stripe. \n* **spaceOpacity**: {0.0 - 1.0} (default: 0.0) - The opacity of the secondary stripe. \n\n## Usage\n\nOnce the pre-built patterns are defined you can use them by adding them as the fill pattern property of any Path in leaflet.\n\n<code>\n var circle = new L.Circle({LatLng}, {radius}, {\n    fillPattern: stripes,\n    fillOpacity: 1.0});\ncircle.addTo(_map);\n</code>\n\nCustom Patterns\n---------------\n\nTo create custom patterns you must first create some shapes to define what the pattern looks like.\n\n### Shapes\n\n**Options**\n\nAll shapes have the following options.\n\n* **stroke**: {boolean} (default: true) - Whether to draw along the path or not.\n* **color**: {color} (default: 3388ff) - Color of the stroke.\n* **weight**: {number} (default: 3) - Width of the stroke.\n* **opacity**: {0.0 - 1.0} (default: 1.0) - Opacity of the stroke.\n* **lineCap**: {butt | round | square | inherit} (default: round) - Defines how the stroke looks at its ends\n* **lineJoin**: {butt | round | square | inherit} (default: round) - Defines how the stroke looks at its corners.\n* **dashArray**: {dashArray} (default: null) - Defines the strokes dash pattern. ex: '5, 5'\n* **dashOffset**: {number} (default: null) - \n* **fill**: {boolean} (default: false) - Should the shape be filled.\n* **fillColor**: {color} (default: same as color) - Color of the fill.\n* **fillOpacity**: {0.0 - 1.0} (default: 0.2) - Opacity of the fill.\n* **fillRule**: {nonzero | evenodd | inherit} (default: evenodd) - \n* **fillPattern**: {L.Pattern} (default: null) - The pattern to fill the Shape with.\n\n### Path\n\n<code>\n    var shape = new L.PatternPath({\n        d: 'M10 0 L7 20 L25 20 Z',\n        fill: true\n    });\n</code>\n\n**Options**\n* **d**: {path} (default: null) - The SVG path definition.\n\n### Circle\n\n<code>\n    var shape = new L.PatternCircle({\n        x: 12,\n        y: 12,\n        radius: 10,\n        fill: true\n    });\n</code>\n\n**Options**\n* **x**: {number} (default: 0) - x offset of the circle.\n* **y**: {number} (default: 0) - y offset of the circle.\n* **radius**: {number} (default: 0) - radius of the circle.\n\n### Rectangle\n\n<code>\n    var shape = new L.PatternRect({\n        x: 5,\n        y: 5,\n        width: 40,\n        height: 40,\n        rx: 10,\n        ry: 10,\n        fill: true\n    });\n</code>\n\n**Options**\n* **x**: {number} (default: 0) - x offset of the rectangle.\n* **y**: {number} (default: 0) - y offset of the rectangle.\n* **width**: {number} (default: 10) - width of the rectangle.\n* **height**: {number} (default: 10) - height of the rectangle.\n* **rx**: {number} (default: null) - x radius for rounded corners\n* **ry**: {number} (default: null) - y radius for rounded corners\n\n## Usage\n\nOnce the paths are defined you can use them by adding them to a Pattern.\n\n<code>\nvar pattern = new L.Pattern({options});\npattern.addShape(shape);\npattern.addTo(map);\n</code>\n\nFinally you can now use the pattern in the fill pattern property of any Path in leaflet.\n\n<code>\n var circle = new L.Circle({LatLng}, {radius}, {\n    fillPattern: pattern,\n    fillOpacity: 1.0});\ncircle.addTo(_map);\n</code>\n","readmeFilename":"README.md"}