0

When you export a map to a webmap through qgis2web, you have a checkbox in the legends to toggle on/off each layer. However, I have a categorized symbology and I want to be able to put checkboxes on each category so that only one or two category of that layer is visible. Is this possible?

2
  • It is not supported by qgis2web. The only way is to duplicate the layer and delete the symbologies you don't want to export. Commented May 24 at 5:11
  • I want the layers to be exported, but I need to have a checkbox that can toggle them on/off. As it is it only toggles as a whole layer. I want each individual category to be toggleable. TomazicM can you provide me with the code for this? Commented May 24 at 6:54

1 Answer 1

1

You can export your map with leaflet and set filters in the Appearance tab. Appareance TAB

The result is a map in which it is possible to turn the layer on and off completely and act on the filter to view only the desired data on the map.

Webmap without filter: Webmap without filter

Webmap with filter: Webmap with filter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.