Reorder features rendering on map

Sometimes features did not appear on a map as desired.  Even if you create a nice point layer classification as shown in this example, some geometries appear under others geometries and will be hidden.  This is causing by the fact that data is not ordered in the database in the same way that the layer class is defined and the platform will draw feature in the order found in the database.  In another word, read first / drawn first.


To fixe that quickly, you can order your data the same way you create your classes.  In this example, we need to find bigger circle size first to draw them first and finish the rendering by the smaller size circle.  For this, you need to click on "Edit template" button, and add an "ORDER BY" in the DATA query:  


         DATA "@field_geom from (
              @subquery ORDER BY size DESC NULLS FIRST
              ) AS subquery
              USING UNIQUE @field_pk USING srid=@srid"



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk