{"_id":"ol3-layerswitcher","_rev":"8-de8c14bb8887a7b6bf7bf969706c80ba","name":"ol3-layerswitcher","description":"Layer switcher control for OpenLayers 3","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"ol3-layerswitcher","version":"1.1.0","description":"Layer switcher control for OpenLayers 3","repository":{"type":"git","url":"git+https://github.com/walkermatt/ol3-layerswitcher.git"},"author":{"name":"Matt Walker","url":"http://longwayaround.org.uk"},"contributors":[{"name":"Thomas Gratier","email":"thomas_gratier@yahoo.fr"},{"name":"Poul Kjeldager Sørensen","email":"pks@s-innovations.net"},{"name":"Micho García","email":"micho.garcia@geomati.co"},{"name":"olivierdalang","email":"olivier.dalang@gmail.com"}],"keywords":["openlayers","layerswitcher","ol3"],"license":"MIT","bugs":{"url":"https://github.com/walkermatt/ol3-layerswitcher/issues"},"scripts":{"doc":"jsdoc --explain src/ol3-layerswitcher.js | node_modules/.bin/dirtydocs util/README.md > README.md"},"dependencies":{"openlayers":"~3.17.1"},"devDependencies":{"expect.js":"~0.3.1","jquery":"~1.11.1","lodash":"~2.4.1","mocha":"~1.20.1","jsdoc":"~3.3.0-beta1","dirtydocs":"0.0.1"},"gitHead":"e9531d17f0bfa6b41310fd222888aa3421e6cf26","homepage":"https://github.com/walkermatt/ol3-layerswitcher#readme","_id":"ol3-layerswitcher@1.1.0","_shasum":"71fdb56ce820acc13c81f643648f3e795ef896ea","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"},"dist":{"shasum":"71fdb56ce820acc13c81f643648f3e795ef896ea","tarball":"https://registry.npmjs.org/ol3-layerswitcher/-/ol3-layerswitcher-1.1.0.tgz","integrity":"sha512-XC15HiV7b6fjVMAn2sBalMaHz7uVxA9zBhYoB/4Zwbhz0LOrSfUdo+fAM0mwO5P1TCEqy5UuU1yxRh5Iwau5qQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2Wzb9KOaE/8GgW4X42YOyiWGYFjigL+p7ljjKulfiWQIhAMPbmqCeWHQGIPMs/D6ol2DAcERKwbWFlH44/skwc+zI"}]},"maintainers":[{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ol3-layerswitcher-1.1.0.tgz_1471982669333_0.6937033082358539"},"directories":{},"deprecated":"Deprecated"},"1.1.1":{"name":"ol3-layerswitcher","version":"1.1.1","description":"Layer switcher control for OpenLayers 3","repository":{"type":"git","url":"git+https://github.com/walkermatt/ol3-layerswitcher.git"},"author":{"name":"Matt Walker","url":"http://longwayaround.org.uk"},"contributors":[{"name":"Thomas Gratier","email":"thomas_gratier@yahoo.fr"},{"name":"Poul Kjeldager Sørensen","email":"pks@s-innovations.net"},{"name":"Micho García","email":"micho.garcia@geomati.co"},{"name":"olivierdalang","email":"olivier.dalang@gmail.com"}],"keywords":["openlayers","layerswitcher","ol3"],"license":"MIT","bugs":{"url":"https://github.com/walkermatt/ol3-layerswitcher/issues"},"scripts":{"doc":"jsdoc --explain src/ol3-layerswitcher.js | node_modules/.bin/dirtydocs util/README.md > README.md"},"dependencies":{"openlayers":"~3.17.1"},"devDependencies":{"expect.js":"~0.3.1","jquery":"~1.11.1","lodash":"~2.4.1","mocha":"~1.20.1","jsdoc":"~3.3.0-beta1","dirtydocs":"0.0.1"},"gitHead":"e9531d17f0bfa6b41310fd222888aa3421e6cf26","homepage":"https://github.com/walkermatt/ol3-layerswitcher#readme","_id":"ol3-layerswitcher@1.1.1","_shasum":"40aae2ac0776e98097bacf5e7f918535923db196","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"},"dist":{"shasum":"40aae2ac0776e98097bacf5e7f918535923db196","tarball":"https://registry.npmjs.org/ol3-layerswitcher/-/ol3-layerswitcher-1.1.1.tgz","integrity":"sha512-LfhJxT5D70s272XvGPhJd0hQ+sNARu+2fSIvrA+4Ro85BLeoRoXM0St8N6mjwEmSSgQWyJKaANMgVOOt1yJnSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtwiIO4EO86KJYGc6FdooZjnoNNMJCyLZGTF+tOD/miAiEAwg3ONzXXmWwg3mIPLu1yA/eQzTW4dkQcIZjJbCJKefc="}]},"maintainers":[{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ol3-layerswitcher-1.1.1.tgz_1471983132909_0.5073254546150565"},"directories":{},"deprecated":"Deprecated"},"1.1.2":{"name":"ol3-layerswitcher","version":"1.1.2","description":"Layer switcher control for OpenLayers 3","repository":{"type":"git","url":"git+https://github.com/walkermatt/ol3-layerswitcher.git"},"author":{"name":"Matt Walker","url":"http://longwayaround.org.uk"},"contributors":[{"name":"Thomas Gratier","email":"thomas_gratier@yahoo.fr"},{"name":"Poul Kjeldager Sørensen","email":"pks@s-innovations.net"},{"name":"Micho García","email":"micho.garcia@geomati.co"},{"name":"olivierdalang","email":"olivier.dalang@gmail.com"}],"keywords":["openlayers","layerswitcher","ol3"],"license":"MIT","bugs":{"url":"https://github.com/walkermatt/ol3-layerswitcher/issues"},"scripts":{"doc":"jsdoc --explain src/ol3-layerswitcher.js | node_modules/.bin/dirtydocs util/README.md > README.md"},"dependencies":{"openlayers":"~3.17.1"},"devDependencies":{"expect.js":"~0.3.1","jquery":"~1.11.1","lodash":"~2.4.1","mocha":"~1.20.1","jsdoc":"~3.3.0-beta1","dirtydocs":"0.0.1"},"gitHead":"e9531d17f0bfa6b41310fd222888aa3421e6cf26","homepage":"https://github.com/walkermatt/ol3-layerswitcher#readme","_id":"ol3-layerswitcher@1.1.2","_shasum":"3f61a8c28193569e7a8380af80d42e3a2e46e278","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"},"dist":{"shasum":"3f61a8c28193569e7a8380af80d42e3a2e46e278","tarball":"https://registry.npmjs.org/ol3-layerswitcher/-/ol3-layerswitcher-1.1.2.tgz","integrity":"sha512-rdyluo1O+dx5IeF9kGfhOs1XtwyhutsXHghFuKcb7r5XgNd4Ol3sthADmBA8LCkJ5XAa5DccTZFsrDqZasxxnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuHlj52vMAcTpWEY7G9MIEKXFrVmGz0ybAmUACX9SSpAiEA64CgQxeuXmcYkdRss+XKml/vClr+bazX24S9mmesxLw="}]},"maintainers":[{"name":"renaud009","email":"renaud.hebertlegault@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ol3-layerswitcher-1.1.2.tgz_1471983298204_0.26475199218839407"},"directories":{},"deprecated":"Deprecated"}},"readme":"# OpenLayers 3 LayerSwitcher\n\nGrouped layer list control for an OL3 map.\n\nAll layers should have a `title` property and base layers should have a `type` property set to `base`. Group layers (`ol.layer.Group`) can be used to visually group layers together. See [examples/layerswitcher.js](examples/layerswitcher.js) for usage.\n\n## Examples\n\nThe examples demonstrate usage and can be viewed online thanks to [RawGit](http://rawgit.com/):\n\n* [Basic usage](http://rawgit.com/walkermatt/ol3-layerswitcher/master/examples/layerswitcher.html)\n    * Create a layer switcher control. Each layer to be displayed in the layer switcher has a `title` property as does each Group; each base map layer has a `type: 'base'` property.\n* [Add layer](http://rawgit.com/walkermatt/ol3-layerswitcher/master/examples/addlayer.html)\n    * Add a layer to an existing layer group after the layer switcher has been added to the map.\n* [Scrolling](http://rawgit.com/walkermatt/ol3-layerswitcher/master/examples/scroll.html)\n    * Demonstrate the panel scrolling vertically, control the height of the layer switcher by setting the `max-height` (see [examples/scroll.css](examples/scroll.css)) and it's position relative to the bottom of the map (see the `.layer-switcher.shown` selector in [src/ol3-layerswitcher.css](src/ol3-layerswitcher.css)).\n\nThe source for all examples can be found in [examples](examples).\n\n## Tests\n\nTo run the tests you'll need to install the dependencies via `npm`. In the root of the repository run:\n\n    npm install\n\nThen run the tests by opening [test/index.html](test/index.html) in a browser.\n\n## API\n\n### `new ol.control.LayerSwitcher(opt_options)`\n\nOpenLayers 3 Layer Switcher Control.\nSee [the examples](./examples) for usage.\n\n#### Parameters:\n\n|Name|Type|Description|\n|:---|:---|:----------|\n|`opt_options`|`Object`| Control options, extends olx.control.ControlOptions adding: **`tipLabel`** `String` - the button tooltip. |\n\n#### Extends\n\n`ol.control.Control`\n\n#### Methods\n\n##### `showPanel()`\n\nShow the layer panel.\n\n##### `hidePanel()`\n\nHide the layer panel.\n\n##### `renderPanel()`\n\nRe-draw the layer panel to represent the current state of the layers.\n\n##### `setMap(map)`\n\nSet the map instance the control is associated with.\n\n###### Parameters:\n\n|Name|Type|Description|\n|:---|:---|:----------|\n|`map`|`ol.Map`| The map instance. |\n\n\n##### `(static) ol.control.LayerSwitcher.forEachRecursive(lyr,fn)`\n\n**Static** Call the supplied function for each layer in the passed layer group\nrecursing nested groups.\n\n###### Parameters:\n\n|Name|Type|Description|\n|:---|:---|:----------|\n|`lyr`|`ol.layer.Group`| The layer group to start iterating from. |\n|`fn`|`function`| Callback which will be called for each `ol.layer.Base` found under `lyr`. The signature for `fn` is the same as `ol.Collection#forEach` |\n\n\n##### `(static) ol.control.LayerSwitcher.uuid()`\n\nGenerate a UUID\n\n## License\n\nMIT (c) Matt Walker.\n\n## Also see\n\nIf you find the layer switcher useful you might also like the\n[ol3-popup](https://github.com/walkermatt/ol3-popup).\n\n","maintainers":[{"email":"npm@npmjs.com","name":"npm"}],"time":{"modified":"2022-06-22T20:26:33.223Z","created":"2016-08-23T20:04:31.002Z","1.1.0":"2016-08-23T20:04:31.002Z","1.1.1":"2016-08-23T20:12:14.830Z","1.1.2":"2016-08-23T20:15:00.649Z"},"homepage":"https://github.com/walkermatt/ol3-layerswitcher#readme","keywords":["openlayers","layerswitcher","ol3"],"repository":{"type":"git","url":"git+https://github.com/walkermatt/ol3-layerswitcher.git"},"contributors":[{"name":"Thomas Gratier","email":"thomas_gratier@yahoo.fr"},{"name":"Poul Kjeldager Sørensen","email":"pks@s-innovations.net"},{"name":"Micho García","email":"micho.garcia@geomati.co"},{"name":"olivierdalang","email":"olivier.dalang@gmail.com"}],"author":{"name":"Matt Walker","url":"http://longwayaround.org.uk"},"bugs":{"url":"https://github.com/walkermatt/ol3-layerswitcher/issues"},"license":"MIT","readmeFilename":"README.md"}