1

first post on this website I'm referring to 100 times a day, very exciting :-) Just wondering if conditionnal formatting (simple colour fill, based on an attribute string evaluation in my case) is supported in a leaflet export? I saw in another post that a limited number of expressions are supported, I've used CASE, but I guess I could use a few concatenated IF's if that's needed? problem !!

2
  • Hi Will_KB, welcome to GIS SE. Great to have you here! Qgis2web works great for standard styling, however, advanced styling options most often do not work, at least not 1:1. QGIS rendering machine is something completely different than web rendering by Leaflet or Openlayers and the plugin has limited capacities to "translate". So I guess there is a lot of manual adapting necessary to create a webmap looking similar as in QGIS. However, if you want to have a webmap looking 1:1 like in your QGIS project, have a look at qgis cloud: qgiscloud.com - install the plugin & publish your map.
    – Babel
    Dec 3, 2022 at 10:01
  • Thanks for the response, I guess for this specific project that's been published and is being used already I'm a bit taken by time so I'll just create a group with separate layers it'll be faster. I've tried QGIS Cloud free in the past and got quickly limited by the 50MB cap for background layers. We're a Burning Man affiliated non for profit organisation and can't afford a monthly license unfortunately :-)
    – Will_KB
    Dec 4, 2022 at 1:32

1 Answer 1

0

The first thing to try is a categorized renderer. While qgis2web support for dynamic styles is limited (as you say, only a tiny subset of expressiom functions are supported), if all you need is to set styles depending on attribute values, that should be exactly what a categorized renderer achieves.

There is every chance that your requirements are more complex, but I'd definitely try to get a categorized renderer to do the heavy lifting for you.

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.