{"analyzedAt":"2022-07-08T20:07:46.546Z","collected":{"metadata":{"name":"leaflet-ruler","scope":"unscoped","version":"1.0.0","description":"A simple leaflet plugin to measure true bearing and distance between clicked points.","keywords":["leaflet","measure"],"date":"2021-08-27T07:55:45.497Z","author":{"name":"Göker Tanrısever","url":"https://www.linkedin.com/in/gokertanrisever/"},"publisher":{"username":"muciacia7","email":"muciacia7@gmail.com"},"maintainers":[{"username":"muciacia7","email":"muciacia7@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gokertanrisever/leaflet-ruler.git"},"links":{"npm":"https://www.npmjs.com/package/leaflet-ruler","homepage":"https://github.com/gokertanrisever/leaflet-ruler#readme","repository":"https://github.com/gokertanrisever/leaflet-ruler","bugs":"https://github.com/gokertanrisever/leaflet-ruler/issues"},"license":"MIT","peerDependencies":{"leaflet":"^1.0.0"},"releases":[{"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":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":3},{"from":"2020-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":3}],"readme":"# Leaflet-Ruler Plugin\r\n\r\nA simple leaflet plugin to measure **true bearing** and **distance** between clicked points. Extends L.Control.\r\n\r\n### [Demo](http://gokertanrisever.github.io/leaflet-ruler)\r\n[![Demo](https://raw.githubusercontent.com/gokertanrisever/leaflet-ruler/master/examples/leaflet-ruler-demo.png)](http://gokertanrisever.github.io/leaflet-ruler)\r\n\r\n## Requirements\r\n- Leaflet 1.0.0+\r\n\r\n## Usage\r\n\r\n- Create a [leaflet map](http://leafletjs.com/examples/quick-start/)\r\n- Include leaflet-ruler.js and leaflet-ruler.css files.\r\n```html\r\n<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/gokertanrisever/leaflet-ruler@master/src/leaflet-ruler.css\" integrity=\"sha384-P9DABSdtEY/XDbEInD3q+PlL+BjqPCXGcF8EkhtKSfSTr/dS5PBKa9+/PMkW2xsY\" crossorigin=\"anonymous\">  \r\n<script src=\"https://cdn.jsdelivr.net/gh/gokertanrisever/leaflet-ruler@master/src/leaflet-ruler.js\" integrity=\"sha384-N2S8y7hRzXUPiepaSiUvBH1ZZ7Tc/ZfchhbPdvOE5v3aBBCIepq9l+dBJPFdo1ZJ\" crossorigin=\"anonymous\"></script>\r\n```\r\n- Add Ruler control to map\r\n```js\r\nL.control.ruler().addTo(map);\r\n```\r\n- Escape button finishes measurement path and starts a new measurement. Second push to escape turns off the plugin.\r\n- Double-click also finishes measurement path and starts a new measurement.\r\n- It's possible to add other units. No need to specify any option value to use defaults.\r\n```js\r\nvar options = {\r\n          position: 'topleft',\r\n          lengthUnit: {\r\n            factor: 0.539956803,    //  from km to nm\r\n            display: 'Nautical Miles',\r\n            decimal: 2\r\n          }\r\n        };\r\nL.control.ruler(options).addTo(map);\r\n```\r\n \r\n\r\n## Default Options\r\n\r\n```js\r\noptions: {\r\n      position: 'topright',         // Leaflet control position option\r\n      circleMarker: {               // Leaflet circle marker options for points used in this plugin\r\n        color: 'red',\r\n        radius: 2\r\n      },\r\n      lineStyle: {                  // Leaflet polyline options for lines used in this plugin\r\n        color: 'red',\r\n        dashArray: '1,6'\r\n      },\r\n      lengthUnit: {                 // You can use custom length units. Default unit is kilometers.\r\n        display: 'km',              // This is the display value will be shown on the screen. Example: 'meters'\r\n        decimal: 2,                 // Distance result will be fixed to this value. \r\n        factor: null,               // This value will be used to convert from kilometers. Example: 1000 (from kilometers to meters)  \r\n        label: 'Distance:'           \r\n      },\r\n      angleUnit: {\r\n        display: '&deg;',           // This is the display value will be shown on the screen. Example: 'Gradian'\r\n        decimal: 2,                 // Bearing result will be fixed to this value.\r\n        factor: null,                // This option is required to customize angle unit. Specify solid angle value for angle unit. Example: 400 (for gradian).\r\n        label: 'Bearing:'\r\n      }\r\n    }\r\n```"},"npm":{"downloads":[{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":18},{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":74},{"from":"2022-06-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":596},{"from":"2022-04-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1098},{"from":"2022-01-09T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":1797},{"from":"2021-07-08T00:00:00.000Z","to":"2022-07-08T00:00:00.000Z","count":2249}],"starsCount":0},"github":{"starsCount":99,"forksCount":52,"subscribersCount":7,"issues":{"count":17,"openCount":9,"distribution":{"3600":2,"10800":0,"32400":0,"97200":1,"291600":1,"874800":0,"2624400":1,"7873200":1,"23619600":0,"70858800":6,"212576400":5},"isDisabled":false},"contributors":[{"username":"DmitriyZaporozhets","commitsCount":3},{"username":"gokertanrisever","commitsCount":5}],"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":2897,"testsSize":0}}},"evaluation":{"quality":{"carefulness":0.71,"tests":0,"health":1,"branding":0},"popularity":{"communityInterest":160,"downloadsCount":366,"downloadsAcceleration":4.381678082191781,"dependentsCount":0},"maintenance":{"releasesFrequency":0.4099315068493151,"commitsFrequency":0,"openIssues":0.47058823529411764,"issuesDistribution":0}},"score":{"final":0.3632029654413107,"detail":{"quality":0.5119267201168272,"popularity":0.10940174925054617,"maintenance":0.48952667762448965}}}