{"_id":"leaflet-curve","_rev":"3-d6a1f950cf48def8e47760949aadd20b","name":"leaflet-curve","description":"A Leaflet plugin for drawing Bézier curves and other complex shapes.","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"leaflet-curve","version":"1.0.0","description":"A Leaflet plugin for drawing Bézier curves and other complex shapes.","main":"leaflet.curve.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/onikiienko/Leaflet.curve.git"},"keywords":["leaflet","Bezier","curve","SVG"],"author":{"name":"onikiienko"},"license":"ISC","bugs":{"url":"https://github.com/onikiienko/Leaflet.curve/issues"},"homepage":"https://github.com/onikiienko/Leaflet.curve#readme","gitHead":"77d55ebebe232d2ada15dd5d9599d4153b95e53f","_id":"leaflet-curve@1.0.0","_shasum":"9053038c59f8630ff82bb55d3009fd017c3c8602","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.6","_npmUser":{"name":"onikiienko","email":"onikiienko@gmail.com"},"dist":{"shasum":"9053038c59f8630ff82bb55d3009fd017c3c8602","tarball":"https://registry.npmjs.org/leaflet-curve/-/leaflet-curve-1.0.0.tgz","integrity":"sha512-PKte9+qVl3ZVF/90V06wmKZCTUdx0Tz20/SQ1iqlq5RamDUQVGesYaQp4g82Kw+qR5troFs/KFoLlqcxtjNE0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7413GDNBdhAELBdAbaiqHqsKw4a2Zt+QOQ8vihLGjEQIgFlGL7qsF3Sk2AnJPGyQcHiWg64oXUsF3mUv4ciKbw+Y="}]},"maintainers":[{"name":"onikiienko","email":"onikiienko@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/leaflet-curve-1.0.0.tgz_1455559255745_0.7084474568255246"}}},"readme":"# Leaflet.curve\nA [Leaflet](http://leafletjs.com) plugin for drawing Bézier curves and other complex shapes. ([DEMO](http://elfalem.github.io/Leaflet.curve/))\n\n### Usage\nInclude the plugin after Leaflet:\n```\n<script src=\"leaflet.js\"></script>\n<script src=\"leaflet.curve.js\"></script>\n```\nAdd a path that includes a Bézier curve and straight lines:\n```\nvar path = L.curve(['M',[50.54136296522163,28.520507812500004],\n\t\t\t\t\t'C',[52.214338608258224,28.564453125000004],\n\t\t\t\t\t\t[48.45835188280866,33.57421875000001],\n\t\t\t\t\t\t[50.680797145321655,33.83789062500001],\n\t\t\t\t\t'V',[48.40003249610685],\n\t\t\t\t\t'L',[47.45839225859763,31.201171875],\n\t\t\t\t\t\t[48.40003249610685,28.564453125000004],'Z'],\n\t\t\t\t\t{color:'red',fill:true}).addTo(map);\n```\n### Requirements\n* This plugin is based on Leaflet version 1.0-beta 2.\n* Currently, only SVG rendering is supported.\n* Browser and device compatibility testing is very limited.\n\n### API\nThe first argument to L.curve() is an array of path data. This is composed of commands and coordinates. The commands are a subset of the SVG path [specification](http://www.w3.org/TR/SVG/paths.html).\n\n|Command|Parameters|Description|\n|-------|----------|-----------|\n|M|[lat,lng]+|move to [lat,lng]|\n|L|[lat,lng]+|line to [lat,lng]|\n|H|[lng]+|horizontal line to [lng]|\n|V|[lat]+|vertical line to [lat]|\n|C|([lat1,lng1],[lat2,lng2],[lat,lng])+|cubic Bézier curve to [lat,lng] with control points at [lat1,lng1] and [lat2,lng2]|\n|S|([lat2,lng2],[lat,lng])+|cubic bézier curve to [lat,lng] with control points at reflection of second control point of previous curve [lat1,lng1] and [lat2,lng2]|\n|Q|([lat1,lng1],[lat,lng])+|quadratic Bézier curve to [lat,lng] with control point at [lat1,lng1]|\n|T|([lat,lng])+|quadratic Bézier curve to [lat,lng] with control point at reflection of control point of previous curve [lat1,lng1]|\n|Z||close path (line to M)|\n\nNote that only absolute commands (uppercase) are implemented. It's possible to approximate elliptical arcs (command 'A') with Bézier curves (the `elliptical-arc` branch implements this command if you're interested).\n\nThe `L.Curve` class extends `L.Path` so options, events, and methods inherited from `L.Path` are available. No new options, events, or methods are introduced by `L.Curve`.\n\n### License\nMIT\n\n### Contributions\n* Bug reports and pull requests are welcome!\n","maintainers":[{"name":"onikiienko","email":"onikiienko@gmail.com"}],"time":{"modified":"2022-06-19T11:12:13.013Z","created":"2016-02-15T18:00:59.485Z","1.0.0":"2016-02-15T18:00:59.485Z"},"homepage":"https://github.com/onikiienko/Leaflet.curve#readme","keywords":["leaflet","Bezier","curve","SVG"],"repository":{"type":"git","url":"git+https://github.com/onikiienko/Leaflet.curve.git"},"author":{"name":"onikiienko"},"bugs":{"url":"https://github.com/onikiienko/Leaflet.curve/issues"},"license":"ISC","readmeFilename":"README.md"}