{"analyzedAt":"2022-07-19T07:35:33.354Z","collected":{"metadata":{"name":"leaflet-measure-v2","scope":"unscoped","version":"3.1.6","description":"Coordinate, linear, and area measure tool for Leaflet maps. Forked from LJA Engineering, Inc - GIS","keywords":["leaflet","measure","measurement","control","coordinate","line","length","area","polygon","path"],"date":"2022-07-19T07:16:58.758Z","author":{"name":"Lawrence Mugambi"},"publisher":{"username":"lawmug","email":"lmugambi40@gmail.com"},"maintainers":[{"username":"lawmug","email":"lmugambi40@gmail.com"}],"repository":{"type":"git","url":"git://github.com/mugambi40/leaflet-measure-v2.git"},"links":{"npm":"https://www.npmjs.com/package/leaflet-measure-v2","homepage":"https://github.com/mugambi40/leaflet-measure-v2#readme","repository":"https://github.com/mugambi40/leaflet-measure-v2","bugs":"https://github.com/mugambi40/leaflet-measure-v2/issues"},"license":"MIT","dependencies":{"@turf/area":"^5.1.5","@turf/length":"^5.1.5","lodash":"^4.17.5"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.1","babel-runtime":"^6.26.0","copy-webpack-plugin":"^4.4.1","css-loader":"^0.28.9","eslint":"^4.17.0","eslint-plugin-import":"^2.8.0","extract-text-webpack-plugin":"^3.0.2","gh-pages":"^1.1.0","glob":"^7.1.2","html-loader":"^0.5.5","husky":"^0.14.3","i18n-webpack-plugin":"^1.0.0","lint-staged":"^6.1.0","node-sass":"^7.0.0","prettier":"^1.10.2","sass-loader":"^6.0.6","style-loader":"^0.20.1","webpack":"^3.10.0","webpack-dev-server":"^2.11.1"},"peerDependencies":{"leaflet":"^1.7.1"},"releases":[{"from":"2022-06-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":0},{"from":"2022-04-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":0},{"from":"2022-01-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":0},{"from":"2021-07-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":5},{"from":"2020-07-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":5}],"readme":"# leaflet-measure\r\n\r\nCoordinate, linear, and area measure control for [Leaflet](http://leafletjs.com) maps. Extends [L.Control](http://leafletjs.com/reference.html#control).\r\n\r\n<hr>\r\n\r\n\r\n## [Demo](http://ljagis.github.io/leaflet-measure)\r\n\r\n![](http://ljagis.github.io/leaflet-measure/assets/leaflet-measure.png)\r\n\r\n<hr>\r\n\r\n\r\n## Usage\r\n\r\nTODO. Add usage\r\n\r\n\r\n## Add control to a Leaflet map\r\n\r\n`leaflet-measure` adds `L.Control.Measure`. This control may be used with the standard Leaflet control workflows [described in the Leaflet docs](http://leafletjs.com/reference.html#control).\r\n\r\nThe measure control can be instantiated directly and added to a map:\r\n```javascript\r\nvar myMap = L.map('mapElementId', options);\r\nvar measureControl = new L.Control.Measure(options);\r\nmeasureControl.addTo(myMap);\r\n```\r\n\r\nor instantiated via the factory:\r\n```javascript\r\nvar myMap = L.map('mapElementId', options);\r\nvar measureControl = L.control.measure(options);\r\nmeasureControl.addTo(myMap);\r\n```\r\n\r\nor added to a map using map options:\r\n```javascript\r\nvar myMap = L.map('mapElementId', {\r\n  measureControl: true\r\n});\r\n```\r\n\r\n<hr> \r\n\r\n\r\n## Control options\r\n\r\n### position\r\n\r\n`{ position: 'topright' }`\r\n\r\nStandard Leaflet control [position options](http://leafletjs.com/reference.html#control-positions)\r\n\r\n### primaryLengthUnit | secondaryLengthUnit\r\n\r\n`{ primaryLengthUnit: 'feet', secondaryLengthUnit: 'miles' }`\r\n\r\nUnits used to display length results. `secondaryLengthUnit` is optional.\r\n\r\nValid values are `feet`, `meters`, `miles`, and `kilometers`\r\n\r\n### primaryAreaUnit | secondaryAreaUnit\r\n\r\n`{ primaryAreaUnit: 'acres', secondaryAreaUnit: undefined }`\r\n\r\nUnits used to display area results. `secondaryAreaUnit` is optional.\r\n\r\nValid values are `acres`, `hectares`, `sqfeet`, `sqmeters`, and `sqmiles`\r\n\r\n### activeColor\r\n\r\n`{ activeColor: '#ABE67E' }`\r\n\r\nBase color to use for map features rendered while actively performing a measurement. Value should be a color represented as a hexadecimal string.\r\n\r\n### completedColor\r\n\r\n`{ completedColor: '#C8F2BE' }`\r\n\r\nBase color to use for features generated from a completed measurement. Value should be a color represented as a hexadecimal string.\r\n\r\n### popupOptions\r\n\r\n`popupOptions: { className: 'leaflet-measure-resultpopup', autoPanPadding: [10, 10] }`\r\n\r\nOptions applied to the popup of the resulting measure feature. Properties may be any standard Leaflet [popup options](http://leafletjs.com/reference.html#popup-options).\r\n\r\n### units\r\n\r\nCustom units to make available to the measurement calculator. Packaged units are `feet`, `meters`, `miles`, and `kilometers` for length and `acres`, `hectares`, `sqfeet`, `sqmeters`, and `sqmiles` for areas. Additional unit definitions can be added to the packaged units using this option.\r\n\r\nDefine units as\r\n\r\n```javascript\r\n{\r\n  someNewUnit: {\r\n    factor: 0.001, // Required. Factor to apply when converting to this unit. Length in meters or area in sq meters will be multiplied by this factor.\r\n    display: 'My New Unit', // Required. How to display in results, like.. \"300 Meters (0.3 My New Unit)\".\r\n    decimals: 2 // Number of decimals to round results when using this unit. `0` is the default value if not specified.\r\n  },\r\n  myOtherNewUnit: {\r\n    factor: 1234,\r\n    display: 'My Other Unit',\r\n    decimals: 0\r\n  }\r\n}\r\n```\r\n\r\n### captureZIndex\r\n\r\n`{ captureZIndex: 10000 }`\r\n\r\nZ-index of the marker used to capture measure clicks. Set this value higher than the z-index of all other map layers to disable click events on other layers while a measurement is active.\r\n\r\n### decPoint | thousandsSep\r\n\r\n`{ decPoint: '.', thousandsSep: ',' }`\r\n\r\nDecimal point and thousands separator used when displaying measurements. If not specified, values are defined by the localization.\r\n\r\n<hr>\r\n\r\n\r\n## Events\r\n\r\nYou can subscribe to the following events on the [Map](http://leafletjs.com/reference.html#map-class) using [these methods](http://leafletjs.com/reference.html#events)\r\n\r\n### measurestart\r\n\r\nFired when measurement starts\r\n\r\n### measurefinish\r\n\r\nFired when measurement finishes with results of the measurement. Results data includes:\r\n\r\n- `area`: Area of a polygon measurement in sq meters. 0 for measurements with less than 3 points.\r\n\r\n- `areaDisplay`: Area formatted as displayed in the popup.\r\n\r\n- `lastCoord`: Last point clicked in both decimal degrees and degress/min/seconds.\r\n\r\n- `length`: Length of the measurement in meters. 0 for measurements with less than 2 points.\r\n\r\n- `lengthDisplay`: Length formatted as displayed in the popup.\r\n\r\n- `pointCount`: Number of points directly added by the user.\r\n\r\n- `points`: Array of points as [`LatLng`](http://leafletjs.com/reference.html#latlng) used to calculate the measurement. Number of items in the array may differ from `pointCoint` because an additional point is added to close polygons during polygon measurements.\r\n\r\n<hr>\r\n\r\n\r\n## Customizing map feature styles\r\n\r\nMap features may be styled using CSS SVG style attributes. Features generated from `leaflet-measure` measurements are given the following class names:\r\n\r\n- **layer-measurearea**: Feature displaying area of an active measurement\r\n\r\n- **layer-measureboundary**: Feature displaying the linear path of an active measurement\r\n\r\n- **layer-measurevertex**: Feature added at each vertex (measurement click) of an active measurement\r\n\r\n- **layer-measuredrag**: Symbol following cursor while moving during an active measurement\r\n\r\n- **layer-measure-resultarea**: Feature added to the map as a permanent layer resulting from an area (3+ points) measurement\r\n\r\n- **layer-measure-resultline**: Feature added to the map as a permanent layer resulting from a linear (2 point) measurement\r\n\r\n- **layer-measure-resultpoint**: Featured added to the map as a permanent layer resulting from a point (single click) measurement\r\n\r\n<hr>\r\n\r\n## Development\r\n\r\nThe build process uses npm (Node Package Management) which comes with Node.js.\r\n\r\nAfter you have Node.js installed you can do ```npm install``` to install dependencies and ```npm run-script start:dev``` to initialize a local server (localhost:8080) for leaflet-measure assets.\r\n\r\nIt detects modifications on source files and re-compiles to /leaflet-measure.css and /leaflet-measure.js.\r\n\r\n## Distribuition Build\r\n\r\nWith npm installed do ```npm install``` to install dependencies and ```npm run-script build``` to generate dist/leaflet-measure.css and dist/leaflet-measure.js.\r\n\r\nIt will also generate dist/leaflet-measure.{locale}.js files for each localization available.\r\n\r\n## Internationalization\r\n\r\nTODO. Internationalization"},"npm":{"downloads":[{"from":"2022-07-18T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":0},{"from":"2022-07-12T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":4},{"from":"2022-06-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":11},{"from":"2022-04-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":51},{"from":"2022-01-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":135},{"from":"2021-07-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":300}],"starsCount":0},"github":{"starsCount":0,"forksCount":1,"subscribersCount":1,"issues":{"count":1,"openCount":0,"distribution":{"3600":1,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"LawrenceWlt","commitsCount":7}],"commits":[{"from":"2022-07-12T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":1},{"from":"2022-06-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":1},{"from":"2022-04-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":1},{"from":"2022-01-20T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":1},{"from":"2021-07-19T00:00:00.000Z","to":"2022-07-19T00:00:00.000Z","count":7}]},"source":{"files":{"readmeSize":6402,"testsSize":0,"hasNpmIgnore":true,"hasChangelog":true},"linters":["eslint","prettier"],"outdatedDependencies":{"@turf/area":{"required":"^5.1.5","stable":"6.5.0","latest":"6.5.0"},"@turf/length":{"required":"^5.1.5","stable":"6.5.0","latest":"6.5.0"}}}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0,"health":0.5,"branding":0},"popularity":{"communityInterest":3,"downloadsCount":17,"downloadsAcceleration":-0.13179223744292234,"dependentsCount":0},"maintenance":{"releasesFrequency":0.3082191780821918,"commitsFrequency":0.37804794520547946,"openIssues":1,"issuesDistribution":1}},"score":{"final":0.5026864681441088,"detail":{"quality":0.4907240221668953,"popularity":0.025409864808608424,"maintenance":0.9902165966029348}}}