I’ve just made a map that has two layers: one that contains the polygons and other that contains points. For the last one, I used rule-based symbology where I define the size and colour of the points by the following rule structure:
If “X”(string) = 'a' and "Y"(real) <= 0.04 and "Y" > 0.03
The problem is that when I try to export it using Qgis2web the layer points disappear no matter if a use Openlayers or Leaflet.
I’ve changed the rule-based symbology and used a simple one. That just worked so I deduce that rule-based symbology and qgis2web don’t get well togheter.
I found here that the rule-based renderer is tied heavily to Qgis expressions, and only a small subset of Qgis expression functions are so far supported in Qgis2web.
I wonder if is there any possible way that I can use my first style layer and not the simple one to export it.
By that I mean, a different rule expression allowed in qgis2web that gives the same result layer, a different way in qgis to recreate my different point size and colour layer that’s also complatible with the qgis2web pluggin, or even any other pluggin that I can use to export my rule-based symbology layer.
Answer
Please preselect your layer with "X" = 'a' and export this selection as a new layer. Then go on with your rule-based renderer on this newly created layer which will be supported in qgis2web:
The ruleset of this working prototype might be similar to yours:
rule based rendering works fine in leaflet and openlayers
No comments:
Post a Comment