{"_id":"leaflet-control-custom","_rev":"2-74ece1111c586d43dd043698affadc8a","name":"leaflet-control-custom","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"leaflet-control-custom","version":"1.0.0","description":"A custom control for leaflet maps.","main":"Leaflet.Control.Custom.js","directories":{"example":"examples"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bazani/Leaflet.Control.Custom.git"},"author":{"name":"Mateus \"ChAZ\" Bazani"},"license":"MIT","bugs":{"url":"https://github.com/bazani/Leaflet.Control.Custom/issues"},"homepage":"https://github.com/bazani/Leaflet.Control.Custom#readme","gitHead":"912710167929fe719daf0d6ec104a3c4b3708556","_id":"leaflet-control-custom@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"mrbazani","email":"mrbazani@gmail.com"},"dist":{"integrity":"sha512-Me7m9/lc/dArlu758vmTlhebVJe5UROtvfluvYdyGetmVTrasva8Airowc8FO7Pz8GM5WqZ8pbgqM8YSh9CcRw==","shasum":"1841e9f16670fac5e63a088c79552a6cbcbee983","tarball":"https://registry.npmjs.org/leaflet-control-custom/-/leaflet-control-custom-1.0.0.tgz","fileCount":5,"unpackedSize":15345,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGOgEgON+YGHO1MZrNtzlE7RyAvM+P/3V1Tf+kZbHokmAiEA6ByKo+UWt49JVMU29rLgws1RvY9PitUl8Odc75sL4dA="}]},"maintainers":[{"name":"mrbazani","email":"mrbazani@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-control-custom_1.0.0_1520298349803_0.6604227263853335"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-06T01:05:49.803Z","1.0.0":"2018-03-06T01:05:49.851Z","modified":"2022-05-07T18:31:13.319Z"},"maintainers":[{"name":"mrbazani","email":"mrbazani@gmail.com"}],"description":"A custom control for leaflet maps.","homepage":"https://github.com/bazani/Leaflet.Control.Custom#readme","repository":{"type":"git","url":"git+https://github.com/bazani/Leaflet.Control.Custom.git"},"author":{"name":"Mateus \"ChAZ\" Bazani"},"bugs":{"url":"https://github.com/bazani/Leaflet.Control.Custom/issues"},"license":"MIT","readme":"# Leaflet.Control.Custom\n\nA Customizable Leaflet Control Panel.\nYou can insert any HTML element to map corners with\n\n  - Custom **id**\n  - Custom **title**\n  - Custom **classes**\n  - Custom **styles**\n  - Custom **data attributes**\n  - Custom **events**\n\n\n## Requirements\nLeaflet v0.6.0+\n\n\n## Installation\nFor convenience (and the fact that the original project isn't update over a year) i created a npm package.\n```\nnpm install --save leaflet-control-custom\n```\n\n\nInclude script inside the head tag after Leaflet:\n\n```\n<script src=\"Leaflet.Control.Custom.js\"></script>\n```\n\n\n\n## Examples\n[Basic Demo](https://yigityuce.github.io/Leaflet.Control.Custom/examples/index.html)\n\n\n\n## Usage\n\n```\n\nvar map = L.map('map').setView([41.044663,29.033775], 12);\n\nL.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{\n    maxZoom: 19,\n    attribution: '&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>'\n}).addTo(map);\n\nL.control.custom({\n    position: 'topright',\n    content : '<button type=\"button\" class=\"btn btn-default\">'+\n              '    <i class=\"fa fa-crosshairs\"></i>'+\n              '</button>'+\n              '<button type=\"button\" class=\"btn btn-info\">'+\n              '    <i class=\"fa fa-compass\"></i>'+\n              '</button>'+\n              '<button type=\"button\" class=\"btn btn-primary\">'+\n              '    <i class=\"fa fa-spinner fa-pulse fa-fw\"></i>'+\n              '</button>'+\n              '<button type=\"button\" class=\"btn btn-danger\">'+\n              '    <i class=\"fa fa-times\"></i>'+\n              '</button>'+\n              '<button type=\"button\" class=\"btn btn-success\">'+\n              '    <i class=\"fa fa-check\"></i>'+\n              '</button>'+\n              '<button type=\"button\" class=\"btn btn-warning\">'+\n              '    <i class=\"fa fa-exclamation-triangle\"></i>'+\n              '</button>',\n    classes : 'btn-group-vertical btn-group-sm',\n    style   :\n    {\n        margin: '10px',\n        padding: '0px 0 0 0',\n        cursor: 'pointer',\n    },\n    datas   :\n    {\n        'foo': 'bar',\n    },\n    events:\n    {\n        click: function(data)\n        {\n            console.log('wrapper div element clicked');\n            console.log(data);\n        },\n        dblclick: function(data)\n        {\n            console.log('wrapper div element dblclicked');\n            console.log(data);\n        },\n        contextmenu: function(data)\n        {\n            console.log('wrapper div element contextmenu');\n            console.log(data);\n        },\n    }\n})\n.addTo(map);\n```\n\n\n## Options\n\nOption | Values | Default | Description\n:--- | :--- | :--- | :---\nposition | \"topleft\", \"topright\", \"bottomleft\", \"bottomright\" | \"topright\" | map position of element\n| id | String | - | wrapper div element's id\n| title | String | - | wrapper div element's title\n| classes | String | - | wrapper div element's class(es) [*Seperate multiple class with space character*] [MDN Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n| content | String | - | html content\n| style | Object | - | wrapper div element's class(es) [MDN HTMLElement.style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style)\n| datas | Object | - | wrapper div element's data(s) [MDN HTMLElement.dataset](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset)\n| events | Object | - | wrapper div element's event(s) and its callbacks\n\n\n\n\n## License\n\nMIT\n\n\n## Version History\n\nVersion | Date | Description\n:--- | :--- | :--- | :---\n| v1.0.1 | Jan 17, 2017 | Stopped scroll propagation over control wrapper\n| v1.0.0 | Jan 10, 2017 | -\n","readmeFilename":"README.md"}