0

I have a dozen layers each with more than a dozen fields. When I run the qgis2web plugin, there are 3 options on how each field can be displayed (no label, inline label, and header label).

I do not want to manually go through over a hundred fields and setting their field style.

Is there a way, once the map is exported using Leaflet, to change the field display using some code?

0

You should change the plugin code before you export your map.

.........For your own purpose: take a look at line 808-810 of the file maindialog.py:

self.attrWidget.addItem("no label") self.attrWidget.addItem("inline label") self.attrWidget.addItem("header label")

If you switch order to:

            self.attrWidget.addItem("inline label")
            self.attrWidget.addItem("header label")
            self.attrWidget.addItem("no label")..................

source: https://github.com/tomchadwin/qgis2web/issues/833

I have not tested the solution for the current version, so I hope, it could also help you now. You know it: You must repeat the code change with a new qgis2web version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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