I need to create one checkbox in QGIS (and qgis2web) that than will show two other layers. So basically I don't want to check two checkboxes in the layerlist, but I want to simplify this process by just checking one checkbox. I want to do this without having to merge multiple layers in one shapefile.
1 Answer
I don't think it works perfectly in qgis2web yet, but you could create a layer group in QGIS and put your two layers into that. As I say, I don't think qgis2web group export works very well yet - I'd try OL3 export rather than Leaflet. See what happens, and report any bugs at https://github.com/tomchadwin/qgis2web/issues.
This means you will still see both layers in the legend, so it might not solve your issue perfectly. To have just a single legend item which controls a pair of layers would need hand-coding, I think.
-
Oké, so the only way to get this working in the qgis2web plugin is by coding it myself?– L. GrunnJan 17, 2016 at 20:19
-
-
Yeah thnx a lot for the info! It's a good suggestion i just tested it and that worked. But Design wise it's not quite what i want. Just hoped that someone coded it already.– L. GrunnJan 17, 2016 at 21:34