{"_id":"leaflet-ruler","_rev":"1-a56178a0b5e1a860354473d32483e91f","name":"leaflet-ruler","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"leaflet-ruler","version":"1.0.0","description":"A simple leaflet plugin to measure true bearing and distance between clicked points.","main":"src/leaflet-ruler.js","scripts":{},"repository":{"type":"git","url":"git+https://github.com/gokertanrisever/leaflet-ruler.git"},"keywords":["leaflet","measure"],"author":{"name":"Göker Tanrısever","url":"https://www.linkedin.com/in/gokertanrisever/"},"contributors":[],"license":"MIT","bugs":{"url":"https://github.com/gokertanrisever/leaflet-ruler/issues"},"homepage":"https://github.com/gokertanrisever/leaflet-ruler#readme","devDependencies":{},"peerDependencies":{"leaflet":"^1.0.0"},"dependencies":{},"gitHead":"a0738d36b452d896899dd1cc098c46564a700e75","_id":"leaflet-ruler@1.0.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","_npmUser":{"name":"muciacia7","email":"muciacia7@gmail.com"},"dist":{"integrity":"sha512-5Ti99czL+hhcd5rMmT5JBkDvzErPUM+ogJbP6NDzJEMK5vCGqS9/1BrMpVeCcCaxViSWLPf9qcXRGcGO85UCZA==","shasum":"3a5d202469484955a106388cee668d9c94baefba","tarball":"https://registry.npmjs.org/leaflet-ruler/-/leaflet-ruler-1.0.0.tgz","fileCount":10,"unpackedSize":19030756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKJqBCRA9TVsSAnZWagAAbdoP/3BqBdBzqoUNQTFOl5nS\nEizAFVl/t7H6mmsO8H0ohzBZ38xnshXO+x2uuKjIUvKdBXTEk1IPlx7UpVyO\nQDH2HPqCFQC7ZuRVgPzwbCiPI8MbqAF7OGu0DKfhYQmVhDo9pjOsW2qT0ruo\nOaYpVmW1efBjiGkOZ/CBVgpll/8aGCKqlgpbpN720fWGHRa4ELKJ5p/LtbGx\nwmBvrTm8lMLXccTSkDnRNWEDi9TTXd8NO7KVMc4JBZDYy+Wf5L1HrQZCycAp\nO7DLmSHKhJ4TUlN8rBueGTF5LbemC4jfRN5EIqXfD0kEU3nU+FYLtta/KEmw\nO0srS1NXz2J/kIkT+Yztx/MxkXpWAfjWrUJrk6PjszUCxhPNJ18o+KxznGiR\norbDCQ/t0tyhZ7RCQUBx+zCbYhQzWMTw2LHdzkeAbIO6p99d6RsqIsuoxuec\nWxDhjftv/BhZnEdqtRd9D+D97tla31NFevp1OpXnFDh8sybKAvTEau0EvONC\nc0G/vPZ0ldCspVLHB8U+Q3nudJMLiSe3ky0HwlLt+1QlOngUPi06sQUvbYa6\nDxdpR31r2Ep8qJ1t7LkYU3VuV9aFNhOvwM2GVZxJytrmXfPztU1bP32rS3NB\nqpuIcTeR0dKfkfRB9xSNlysLLLg91zsh5c5Q94TpEo0zLAti3blqK67CqJXZ\njKQ0\r\n=rgLc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD04UtwtL3/OIAGsY77j0iePu/am8sL2mw9ITB9Kr38JwIhAJvm0q3calHT3NbQLoXeYtaqrEosKeFwBFslsyy4UhqG"}]},"directories":{},"maintainers":[{"name":"muciacia7","email":"muciacia7@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-ruler_1.0.0_1630050943698_0.509767369456378"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-27T07:55:43.698Z","1.0.0":"2021-08-27T07:55:45.497Z","modified":"2022-05-07T18:40:46.480Z"},"maintainers":[{"name":"muciacia7","email":"muciacia7@gmail.com"}],"description":"A simple leaflet plugin to measure true bearing and distance between clicked points.","homepage":"https://github.com/gokertanrisever/leaflet-ruler#readme","keywords":["leaflet","measure"],"repository":{"type":"git","url":"git+https://github.com/gokertanrisever/leaflet-ruler.git"},"contributors":[],"author":{"name":"Göker Tanrısever","url":"https://www.linkedin.com/in/gokertanrisever/"},"bugs":{"url":"https://github.com/gokertanrisever/leaflet-ruler/issues"},"license":"MIT","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```","readmeFilename":"README.md"}