{"analyzedAt":"2022-07-04T08:08:13.186Z","collected":{"metadata":{"name":"awshanks-leaflet-measure","scope":"unscoped","version":"3.1.1","description":"Coordinate, linear, and area measure tool for Leaflet maps","keywords":["leaflet","measure","measurement","control","coordinate","line","length","area","polygon","path"],"date":"2020-05-12T14:25:53.877Z","author":{"name":"LJA Engineering, Inc - GIS","email":"gisdev@ljaengineering.com"},"publisher":{"username":"nbg.dev","email":"nbg.dev@gmail.com"},"maintainers":[{"username":"nbg.dev","email":"nbg.dev@gmail.com"}],"repository":{"type":"git","url":"git://github.com/awshanks/leaflet-measure.git"},"links":{"npm":"https://www.npmjs.com/package/awshanks-leaflet-measure"},"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":"^4.7.2","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.0.0"},"releases":[{"from":"2022-06-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2022-04-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":1},{"from":"2022-01-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":1},{"from":"2021-07-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":1},{"from":"2020-07-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":1}],"readme":"# leaflet-measure\n\nCoordinate, linear, and area measure control for [Leaflet](http://leafletjs.com) maps. Extends [L.Control](http://leafletjs.com/reference.html#control).\n\n<hr>\n\n\n## [Demo](http://ljagis.github.io/leaflet-measure)\n\n![](http://ljagis.github.io/leaflet-measure/assets/leaflet-measure.png)\n\n<hr>\n\n\n## Usage\n\nTODO. Add usage\n\n\n## Add control to a Leaflet map\n\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).\n\nThe measure control can be instantiated directly and added to a map:\n```javascript\nvar myMap = L.map('mapElementId', options);\nvar measureControl = new L.Control.Measure(options);\nmeasureControl.addTo(myMap);\n```\n\nor instantiated via the factory:\n```javascript\nvar myMap = L.map('mapElementId', options);\nvar measureControl = L.control.measure(options);\nmeasureControl.addTo(myMap);\n```\n\nor added to a map using map options:\n```javascript\nvar myMap = L.map('mapElementId', {\n  measureControl: true\n});\n```\n\n<hr>\n\n\n## Control options\n\n### position\n\n`{ position: 'topright' }`\n\nStandard Leaflet control [position options](http://leafletjs.com/reference.html#control-positions)\n\n### primaryLengthUnit | secondaryLengthUnit\n\n`{ primaryLengthUnit: 'feet', secondaryLengthUnit: 'miles' }`\n\nUnits used to display length results. `secondaryLengthUnit` is optional.\n\nValid values are `feet`, `meters`, `miles`, and `kilometers`\n\n### primaryAreaUnit | secondaryAreaUnit\n\n`{ primaryAreaUnit: 'acres', secondaryAreaUnit: undefined }`\n\nUnits used to display area results. `secondaryAreaUnit` is optional.\n\nValid values are `acres`, `hectares`, `sqfeet`, `sqmeters`, and `sqmiles`\n\n### activeColor\n\n`{ activeColor: '#ABE67E' }`\n\nBase color to use for map features rendered while actively performing a measurement. Value should be a color represented as a hexadecimal string.\n\n### completedColor\n\n`{ completedColor: '#C8F2BE' }`\n\nBase color to use for features generated from a completed measurement. Value should be a color represented as a hexadecimal string.\n\n### popupOptions\n\n`popupOptions: { className: 'leaflet-measure-resultpopup', autoPanPadding: [10, 10] }`\n\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).\n\n### units\n\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.\n\nDefine units as\n\n```javascript\n{\n  someNewUnit: {\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.\n    display: 'My New Unit', // Required. How to display in results, like.. \"300 Meters (0.3 My New Unit)\".\n    decimals: 2 // Number of decimals to round results when using this unit. `0` is the default value if not specified.\n  },\n  myOtherNewUnit: {\n    factor: 1234,\n    display: 'My Other Unit',\n    decimals: 0\n  }\n}\n```\n\n### captureZIndex\n\n`{ captureZIndex: 10000 }`\n\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.\n\n### decPoint | thousandsSep\n\n`{ decPoint: '.', thousandsSep: ',' }`\n\nDecimal point and thousands separator used when displaying measurements. If not specified, values are defined by the localization.\n\n<hr>\n\n\n## Events\n\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)\n\n### measurestart\n\nFired when measurement starts\n\n### measurefinish\n\nFired when measurement finishes with results of the measurement. Results data includes:\n\n- `area`: Area of a polygon measurement in sq meters. 0 for measurements with less than 3 points.\n\n- `areaDisplay`: Area formatted as displayed in the popup.\n\n- `lastCoord`: Last point clicked in both decimal degrees and degress/min/seconds.\n\n- `length`: Length of the measurement in meters. 0 for measurements with less than 2 points.\n\n- `lengthDisplay`: Length formatted as displayed in the popup.\n\n- `pointCount`: Number of points directly added by the user.\n\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.\n\n<hr>\n\n\n## Customizing map feature styles\n\nMap features may be styled using CSS SVG style attributes. Features generated from `leaflet-measure` measurements are given the following class names:\n\n- **layer-measurearea**: Feature displaying area of an active measurement\n\n- **layer-measureboundary**: Feature displaying the linear path of an active measurement\n\n- **layer-measurevertex**: Feature added at each vertex (measurement click) of an active measurement\n\n- **layer-measuredrag**: Symbol following cursor while moving during an active measurement\n\n- **layer-measure-resultarea**: Feature added to the map as a permanent layer resulting from an area (3+ points) measurement\n\n- **layer-measure-resultline**: Feature added to the map as a permanent layer resulting from a linear (2 point) measurement\n\n- **layer-measure-resultpoint**: Featured added to the map as a permanent layer resulting from a point (single click) measurement\n\n<hr>\n\n## Development\n\nThe build process uses npm (Node Package Management) which comes with Node.js.\n\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.\n\nIt detects modifications on source files and re-compiles to /leaflet-measure.css and /leaflet-measure.js.\n\n## Distribuition Build\n\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.\n\nIt will also generate dist/leaflet-measure.{locale}.js files for each localization available.\n\n## Internationalization\n\nTODO. Internationalization"},"npm":{"downloads":[{"from":"2022-07-03T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2022-06-27T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":1},{"from":"2022-06-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":6},{"from":"2022-04-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":30},{"from":"2022-01-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":45},{"from":"2021-07-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":73}],"starsCount":0},"github":{"homepage":"http://ljagis.github.io/leaflet-measure/","forkOf":"ljagis/leaflet-measure","starsCount":0,"forksCount":0,"subscribersCount":0,"issues":{"count":0,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":true},"contributors":[{"username":"brandoncopeland","commitsCount":1},{"username":"Nyxelio","commitsCount":1},{"username":"ValMilkevich","commitsCount":2},{"username":"bekerov","commitsCount":2},{"username":"barbalex","commitsCount":2},{"username":"penpendede","commitsCount":4},{"username":"exequiel09","commitsCount":1},{"username":"dirceu-jr","commitsCount":2},{"username":"schmidtpa","commitsCount":1},{"username":"ismyrnow","commitsCount":2},{"username":"ulrikls","commitsCount":1},{"username":"Opadera","commitsCount":8},{"username":"haoliangyu","commitsCount":1},{"username":"ErikNijland","commitsCount":2},{"username":"najafsen","commitsCount":1},{"username":"spatialhast","commitsCount":2},{"username":"awshanks","commitsCount":1},{"username":"brandonxiang","commitsCount":1},{"username":"pedroetb","commitsCount":3},{"username":"nathanvda","commitsCount":1},{"username":"marigerr","commitsCount":1},{"username":"nguyenning","commitsCount":2},{"username":"simon04","commitsCount":4},{"username":"napo","commitsCount":1}],"commits":[{"from":"2022-06-27T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2022-06-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2022-04-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2022-01-05T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0},{"from":"2021-07-04T00:00:00.000Z","to":"2022-07-04T00:00:00.000Z","count":0}]},"source":{"files":{"readmeSize":6401,"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.4},"popularity":{"communityInterest":24,"downloadsCount":10,"downloadsAcceleration":0.012499999999999997,"dependentsCount":0},"maintenance":{"releasesFrequency":0.28664383561643836,"commitsFrequency":0,"openIssues":0.7,"issuesDistribution":0.7}},"score":{"final":0.3493478182860156,"detail":{"quality":0.4907240221668953,"popularity":0.053381306221556075,"maintenance":0.5241347270240067}}}