By David Crowther
Question:
How can you reverse the drawing order of features in a WMS Layer?
Answer:
In this previous FAQ we explore how you can change the drawing order of your map features using a sequential value in a field in the source data –
… enabling hidden map features to be drawn last and therefore now show in the map.
The line item to include in your SLD to re-sort the drawing order using the sequential values in a field e.g. using the qgs_fid value is shown below –
<VendorOption name="sortBy">qgs_fid</VendorOption>
If, however, you wish to reverse the drawing order of the features using the same field, you simply need to add the sort syntax to the line. For ascending add ‘A’ and to sort in descending order add ‘D’ -
<VendorOption name="sortBy">qgs_fid D</VendorOption>
Comments
0 comments
Please sign in to leave a comment.