{"analyzedAt":"2022-07-08T20:09:08.201Z","collected":{"metadata":{"name":"leaflet-measure-path","scope":"unscoped","version":"1.5.0","description":"Show measurements on Leaflet paths","keywords":["leaflet","measurement","path"],"date":"2020-08-16T22:34:39.778Z","author":{"name":"Per Liedman","email":"per@liedman.net","username":"liedman"},"publisher":{"username":"liedman","email":"per@liedman.net"},"maintainers":[{"username":"liedman","email":"per@liedman.net"}],"contributors":[{"name":"William Funk","email":"contact@williamradfunk.com","url":"http://www.williamrobertfunk.com/"}],"repository":{"type":"git","url":"git+ssh://git@github.com/perliedman/leaflet-measure-path.git"},"links":{"npm":"https://www.npmjs.com/package/leaflet-measure-path","homepage":"https://github.com/perliedman/leaflet-measure-path","repository":"https://github.com/perliedman/leaflet-measure-path","bugs":"https://github.com/perliedman/leaflet-measure-path/issues"},"license":"ISC","devDependencies":{"mocha":"^3.0.2"},"releases":[{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1},{"from":"2020-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":2}],"readme":"# Leaflet Measure Path\n\n![Leaflet 1.0 compatible!](https://img.shields.io/badge/Leaflet%201.0.0-%E2%9C%93-1EB300.svg?style=flat)\n\nA plugin to show measurements on paths (polylines, polygons and circles currently supported).\n\n[Leaflet Measure Path demo](http://prominentedge.com/leaflet-measure-path/)\n\n## Usage\n\nLoad `leaflet-measure-path.js` and `leaflet-measure-path.css`. Then, to enable measurements on a path:\n\n```js\nvar polygon = L.polygon([ ... ])\n    .addTo(map)\n    .showMeasurements();\n```\n\nTo later hide measurements:\n\n```js\nvar polygon = L.polygon([ ... ])\n    .addTo(map)\n    .hideMeasurements();\n```\n\n## API\n\nThe simplest way to enable measurements for a path is to pass the option `showMeasurements: true` when\ncreating the path. To control the measurement options, you can also pass `measurementOptions`, see [options](#options) below.\n\nThe plugin also adds the methods listed below to Leaflet's `L.Polyline`, `L.Polygon` and `L.Circle` classes.\n\n### showMeasurements(options)\n\nEnables measurements. You can also overide the defaults by passing an options object.\n\n#### Options\n\n* `showOnHover: Boolean` (default `false`): if `true`, the measurements will only show when the user hovers the cursor over the path\n* `showTotalDistance: Boolean` (default `true`): if `false`, the total length of polyline will not be shown\n* `minDistance: Number` (default `30`): the minimum length a line segment in the feature must have for a measurement to be added\n* `formatDistance: Function`: allows to override the built-in function that formats a distance in meters to the string shown in the map\n* `formatArea: Function`: allows to override the built-in function that formats an area in square meters to the string shown in the map\n\n### hideMeasurements()\n\nDisables measurements.\n\n### updateMeasurements()\n\nUpdates the measurements displayed. Normally, this method is called automatically if the path's geometry is changed using `setLatLngs`, `spliceLatLngs` or when the map is zoomed. If the geometry is somehow changed by other means, this method can be called to force the measurements to update."},"npm":{"downloads":[{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":155},{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":725},{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":3648},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":11160},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":21097},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":36642}],"starsCount":1},"github":{"starsCount":58,"forksCount":21,"subscribersCount":3,"issues":{"count":41,"openCount":13,"distribution":{"3600":0,"10800":1,"32400":4,"97200":5,"291600":3,"874800":5,"2624400":5,"7873200":3,"23619600":3,"70858800":3,"212576400":9},"isDisabled":false},"contributors":[{"username":"npmcdn-to-unpkg-bot","commitsCount":1},{"username":"codeofsumit","commitsCount":3},{"username":"moerkdhi","commitsCount":1},{"username":"flywire","commitsCount":1},{"username":"entioentio","commitsCount":2},{"username":"perliedman","commitsCount":10},{"username":"WilliamRADFunk","commitsCount":1},{"username":"grinat","commitsCount":1}],"commits":[{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0}]},"source":{"files":{"readmeSize":2106,"testsSize":8285}}},"evaluation":{"quality":{"carefulness":0.71,"tests":0.3,"health":1,"branding":0},"popularity":{"communityInterest":91,"downloadsCount":3720,"downloadsAcceleration":9.506868340943683,"dependentsCount":0},"maintenance":{"releasesFrequency":0.7622431506849314,"commitsFrequency":0,"openIssues":0.8048780487804879,"issuesDistribution":0}},"score":{"final":0.439480971466635,"detail":{"quality":0.7501399456504731,"popularity":0.11365144466478247,"maintenance":0.49903137753948335}}}