Description of the limitation and why it is relevant to address
When defining map features it would be nice if the order of the features is also the order on the map so we can define which feature should be on top of which other feature. For example, in this code
features.append(MapPolyline(*self._assessment.levee.mappoints))
for cptm in self._assessment.levee.cpt_metadata:
features.append(MapPoint(cptm.lat, cptm.lon, cptm.z, title=cptm.name, color=Color.viktor_blue()))
I expect the map points to be on top of the map polyline but they are not.
Different types of features are drawn ‘per layer’ on the map following a ‘render order’. Meaning that all polygons & polylines are drawn in one layer, all point markers are drawn together in another, etc. Features can therefore not be ordered on an individual basis.
Polygons & polylines (one layer) used to be above the ‘Point markers layer’ but this has just been swapped around to prevent the unexpected overlapping shown in your image. Now, the order of map layers from bottom to top is [Polygons & Polylines, Point markers, drawn GeoField features, Labels].
It would be nice to have control over the order in which elements are drawn, also within a layer.
I have a use case where there are many points drawn with a color depending on the category. I would like the red category (alarm phase) to be on top, and the green points below.
Sorting the points does seem to change the order, but not completely.