{"analyzedAt":"2022-06-25T17:25:24.892Z","collected":{"metadata":{"name":"vue2-leaflet-polyline-measure","scope":"unscoped","version":"1.2.1","description":"Leaflet.PolylineMeasure control plugin extension for Vue2Leaflet package","keywords":["vue","leaflet","vue2leaflet","polylinemeasure","ruler"],"date":"2020-08-18T18:12:06.231Z","author":{"name":"Michael Underwood"},"publisher":{"username":"mikeu","email":"mike.underwood@gmail.com"},"maintainers":[{"username":"mikeu","email":"mike.underwood@gmail.com"}],"repository":{"type":"git","url":"git+ssh://git@github.com/mikeu/vue2-leaflet-polyline-measure.git"},"links":{"npm":"https://www.npmjs.com/package/vue2-leaflet-polyline-measure","homepage":"https://github.com/mikeu/vue2-leaflet-polyline-measure#readme","repository":"https://github.com/mikeu/vue2-leaflet-polyline-measure","bugs":"https://github.com/mikeu/vue2-leaflet-polyline-measure/issues"},"license":"MIT","dependencies":{"leaflet.polylinemeasure":"github:ppete2/Leaflet.PolylineMeasure#b85a4b9","vue2-leaflet":"^2.0.0"},"devDependencies":{"@types/leaflet":"^1.5.17","babel-eslint":"^10.1.0","eslint":"^6.8.0","eslint-plugin-vue":"^6.2.2","leaflet":"^1.3.4","poi":"^12.9.0","vue":"^2.6.11","vue-template-compiler":"^2.6.11"},"releases":[{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":1},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":1},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":1},{"from":"2020-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":2}],"readme":"# vue2-leaflet-polyline-measure\n\nThis is a [Vue2Leaflet](https://github.com/KoRiGaN/Vue2Leaflet) plugin to provide the\n[Leaflet.PolylineMeasure](https://github.com/ppete2/Leaflet.PolylineMeasure) control\non [Leaflet](https://leafletjs.com/) maps in [Vue](https://vuejs.org/) applications.\n\n\n## Installation\n```bash\nnpm install --save vue2-leaflet-polyline-measure\n```\n\n## Local demo\n```bash\ngit clone git@github.com:mikeu/vue2-leaflet-polyline-measure.git\ncd vue2-leaflet-polyline-measure\n\nnpm install\nnpm run example\n```\nYou should then be able to visit http://localhost:4000 to see a leaflet map with the polyline\nmeasurement tool. Events fired by the tool will be logged beneath the map as you interact with it.\n\n\n## Usage\n\n### Adding the component to a map\n\nWith the `LControlPolylineMeasure` component loaded into Vue (see below), simply add the\n`l-control-poyline-measure` element inside an `l-map`, optionally providing it with an\n`options` object to specify any of the\n[Leaflet.PolylineMeasure options](https://github.com/ppete2/Leaflet.PolylineMeasure#default-options)\nto be set when the control is created, or the\n[Leaflet Control position](https://leafletjs.com/reference-1.4.0.html#control-position)\nin which to display the control.\nFor example,\n```html\n<l-map>\n  <l-control-polyline-measure :options=\"{ showUnitControl: true }\" position=\"bottomright\"/>\n  <!-- other map components -->\n</l-map>\n```\n\n#### Polyline measurement events\n\nThe polyline measurement control fires events from the map to which it has been added. In Vue, these\ncan be listened for in the standard fashion, by adding event handlers the the `LMap` control within\nwhich the `LControlPolylineMeasure` is being used:\n```html\n<l-map\n    @polylinemeasure:toggle=\"handleToggle\"\n    @polylinemeasure:start=\"handleStart\"\n    @polylinemeasure:resume=\"handleResume\"\n    @polylinemeasure:finish=\"handleFinish\"\n    @polylinemeasure:clear=\"handleClear\"\n    @polylinemeasure:add=\"handleAdd\"\n    @polylinemeasure:insert=\"handleInsert\"\n    @polylinemeasure:move=\"handleMove\"\n    @polylinemeasure:remove=\"handleRemove\"\n>\n  <l-control-polyline-measure :options=\"{ showUnitControl: true }\" position=\"bottomright\"/>\n  <!-- other map components -->\n</l-map>\n```\nOf course, the `handleToggle`, `handleStart`, etc., methods must be defined within the Vue component\nthat is calling them.\n\nSee the [Events](https://github.com/ppete2/Leaflet.PolylineMeasure#events) section of the\nLeaflet.PolylineMeasure documentation for more details about the arguments passed to each event\nhandler.\n\n\n### Loading the Vue component\n\nYou can either install the control globally within your application at the point where you initially\nconfigure Vue, or import the control only within the components that require it.\n\n\n#### Option 1: Global install\n\nWhere you load and configure your Vue environment,\n```js\nimport Vue from 'vue';\nimport LControlPolylineMeasure from 'vue2-leaflet-polyline-measure';\n// ...\nVue.component('l-control-polyline-measure', LControlPolylineMeasure);\n// ...\n```\n\n\n#### Option 2: Local import\n\nIn the `<script>` of a Vue component,\n```js\nimport LControlPolylineMeasure from 'vue2-leaflet-polyline-measure';\n// ...\nexport default {\n  // ...\n  components: {\n    LControlPolylineMeasure,\n    // ...\n  },\n  // ...\n};\n```\n\n\n## Credit\n\nThe majority of the credit for this plugin goes to the author of and contributors to the underlying\n[Leaflet.PolylineMeasure control](https://github.com/ppete2/Leaflet.PolylineMeasure), and of course\nthe plugin wouldn't be possible without Vue, Leaflet, and Vue2Leaflet.\n\n\n### Plugin author\n\nMichael Underwood\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details."},"npm":{"downloads":[{"from":"2022-06-24T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":16},{"from":"2022-06-18T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":227},{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":938},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":3048},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":5640},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":9484}],"starsCount":0},"github":{"starsCount":9,"forksCount":1,"subscribersCount":3,"issues":{"count":30,"openCount":8,"distribution":{"3600":3,"10800":0,"32400":2,"97200":2,"291600":1,"874800":2,"2624400":6,"7873200":10,"23619600":4,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"mikeu","commitsCount":31},{"username":"dependabot[bot]","commitsCount":16}],"commits":[{"from":"2022-06-18T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-05-26T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2022-03-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2021-12-27T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":0},{"from":"2021-06-25T00:00:00.000Z","to":"2022-06-25T00:00:00.000Z","count":3}]},"source":{"files":{"readmeSize":3714,"testsSize":0,"hasChangelog":true},"linters":["eslint"],"outdatedDependencies":{"leaflet.polylinemeasure":{"required":"github:ppete2/Leaflet.PolylineMeasure#b85a4b9","stable":"3.0.0","latest":"3.0.0"}}}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0,"health":0.75,"branding":0},"popularity":{"communityInterest":15,"downloadsCount":1016,"downloadsAcceleration":2.6582191780821907,"dependentsCount":0},"maintenance":{"releasesFrequency":0.29897260273972603,"commitsFrequency":0.03452054794520548,"openIssues":0.888888888888889,"issuesDistribution":0.8391620941558442}},"score":{"final":0.49381168380097495,"detail":{"quality":0.5316248642436456,"popularity":0.06637991830813111,"maintenance":0.8888321517715297}}}