1

I need some edits on my Leaflet webmap which are not supported using qgis2web plugin. I want to add SVG logo on two polygon features on the map. The SVG logos that I want to place on two parcel data. I have tried to add svg symbol for polygons, but that is not visible on the generated leaflet webmap. SVG symbols for point features are supported in the plugin, but not for polygon. How I can solve my problem?

1 Answer 1

1

As you say, qgis2web does not support this directly. You could do the following:

  1. In QGIS, click Vector > Geometry Tools > Polygon centroids
  2. Style the new layer ("Centroids") with the SVGs you need, and rename the layer to something appropriate for your map

The downside to this is that you will end up with two layers: the polygons and the SVGs.

To achieve this properly, export of the symbol layer "Centroid fill" would be needed in qgis2web, but this has not yet been developed.

2
  • I have already done it, but in that case I will have a two layers in legend (point layer with svg logo and empty polygone layer) and I don't want that. There must be some part of code to add on my map to solve this problem.
    – user104851
    Sep 26, 2017 at 14:18
  • Is there a way to connect these two layers (points and polygon)so if I turn on the polygon layer the point layer will be turned on too? On that way the logo should appear on the polygon.
    – user104851
    Sep 26, 2017 at 19:50

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.