In my QGIS3 Plugin I have a multipolygon layer. I need to set programmatically a SVG icon for a selected feature, without changing the style of the other features. Basically I need to replicate what is in the image for just one feature in PyQGIS. How can I do this?

enter image description here

EDIT: I thought that maybe I can use a rule-based approach, setting the SVG marker, using the ID attribute of the feature, and the default style for the others features. Unfortunately I don't find how to do this using PyQGIS.

Your Answer

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

Browse other questions tagged or ask your own question.