{"analyzedAt":"2022-07-08T20:09:23.388Z","collected":{"metadata":{"name":"leaflet-measure-locale","scope":"unscoped","version":"1.4.1","description":"Coordinate, linear, and area measure tool for Leaflet maps","keywords":["leaflet","measure","measurement","control","coordinate","line","length","area","polygon","path","locale"],"date":"2015-12-15T13:52:39.620Z","author":{"name":"Brandon Copeland","email":"br@ndoncopeland.com"},"publisher":{"username":"bekerov","email":"bekerov.artur@yandex.ru"},"maintainers":[{"username":"bekerov","email":"bekerov.artur@yandex.ru"}],"repository":{"type":"git","url":"git://github.com/bekerov/leaflet-measure.git"},"links":{"npm":"https://www.npmjs.com/package/leaflet-measure-locale","homepage":"https://github.com/bekerov/leaflet-measure#readme","repository":"https://github.com/bekerov/leaflet-measure","bugs":"https://github.com/bekerov/leaflet-measure/issues"},"license":"MIT","dependencies":{"brfs":"^1.3.0","color":"^0.8.0","geocrunch":"^0.1.1","humanize":"0.0.9","leaflet":"^0.7.3","underscore":"^1.7.0"},"devDependencies":{"browserify":"^8.1.3","browserify-shim":"^3.8.3","grunt":"^0.4.5","grunt-browserify":"^3.3.0","grunt-contrib-clean":"^0.6.0","grunt-contrib-jshint":"^0.11.0","grunt-contrib-sass":"^0.9.2","grunt-contrib-uglify":"^0.7.0","grunt-jscs":"^1.2.0","grunt-release":"^0.11.0","svg2png":"^1.1.0","i18n-2":"^0.6.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":1}],"hasTestScript":true,"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[Demo](http://ljagis.github.io/leaflet-measure)\r\n\r\n[![Demo](https://raw.githubusercontent.com/ljagis/leaflet-measure/master/example/leaflet-measure-demo.jpg)](http://ljagis.github.io/leaflet-measure)\r\n\r\n<hr>\r\n\r\n## Install Options\r\n\r\n- Clone.. `git clone https://github.com/bekerov/leaflet-measure.git`\r\n\r\n- Install with [Bower](http://bower.io/).. `bower install leaflet-measure`\r\n\r\n- Install with [npm](https://www.npmjs.com/).. `npm install leaflet-measure-locale`\r\n\r\n## Use bundled `leaflet-measure.min.js` or `leaflet-measure.js`\r\n\r\nInclude the [Leaflet Source](http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js), `leaflet-measure.min.js`, and associated CSS stylesheets in your HTML page\r\n\r\n```html\r\n<!doctype HTML>\r\n<html>\r\n<head>\r\n  <meta charset=\"utf-8\">\r\n  <link rel=\"stylesheet\" href=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css\">\r\n  <link rel=\"stylesheet\" href=\"leaflet-measure.css\">\r\n</head>\r\n<body>\r\n  <script src=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js\"></script>\r\n  <script src=\"leaflet-measure.min.js\"></script>\r\n  <script>\r\n    // Start creating maps\r\n  </script>\r\n</body>\r\n</html>\r\n```\r\n\r\n## Use with [npm](https://www.npmjs.com/)\r\n\r\n```javascript\r\nvar L = require('leaflet');\r\nrequire('leaflet-measure-locale');\r\n\r\n// Start creating maps\r\n```\r\n\r\n<hr>\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## 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### localization\r\n\r\n`{ localization: 'ru' }`\r\n\r\nDesired locale to translate texts.\r\n\r\nValid values are `en`, `es` and `ru`. If not specified, defaults to `en`.\r\n\r\n\r\n<hr>\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-measurecollector**: Transparent layer covering full map and catching click and drag events\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"},"npm":{"downloads":[{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":0},{"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":9},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":40},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":72},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":140}],"starsCount":0},"github":{"homepage":"http://ljagis.github.io/leaflet-measure/","forkOf":"ljagis/leaflet-measure","starsCount":0,"forksCount":1,"subscribersCount":2,"issues":{"count":2,"openCount":0,"distribution":{"3600":1,"10800":1,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":true},"contributors":[{"username":"spv93","commitsCount":2},{"username":"ismyrnow","commitsCount":1},{"username":"bekerov","commitsCount":4},{"username":"simon04","commitsCount":4}],"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":5491,"testsSize":0},"linters":["jscs","jshint"],"outdatedDependencies":{"color":{"required":"^0.8.0","stable":"4.2.3","latest":"4.2.3"},"leaflet":{"required":"^0.7.3","stable":"1.8.0","latest":"1.8.0"},"brfs":{"required":"^1.3.0","stable":"2.0.2","latest":"2.0.2"}}}},"evaluation":{"quality":{"carefulness":0.84,"tests":0,"health":0.5,"branding":0},"popularity":{"communityInterest":7,"downloadsCount":13.333333333333334,"downloadsAcceleration":-0.016780821917808206,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.5036048490399284,"detail":{"quality":0.4706113509442165,"popularity":0.03560900534708432,"maintenance":0.9998808339576686}}}