Select to view content in your preferred language

Cannot display overlapping features in correct drawing order in Map Viewer

627
3
10-28-2022 06:39 AM
Labels (1)
FranklinAlexander
Frequent Contributor

I am updating a current Web AppBuilder application to Experience Builder and the drawing order of the features is important. I understand that by default the drawing order is set using the OBJECTID field in descending order which seems to be working as expected in Map Viewer Classic. When I add the layer to the newer Map Viewer, however, the features do not draw in the correct order. I also tried to use the same Map Viewer Classic version of the map in my new Experience Builder app, but I am assuming that the map gets converted to the newer Map Viewer version because the drawing order was incorrect. I am fairly certain that this is a bug in the newer map viewer and I hope it is being addressed, but in the meantime if anyone knows of a work around to get the features to draw correctly please advise. Here is a link to the Esri documentation that describes how to set the display order:

https://doc.arcgis.com/en/arcgis-online/create-maps/set-feature-display-order.htm

In step 6 it explicitly states that the features should display (if default is selected) by object ID 'with features assigned higher IDs displayed on top'.  This is not happening. Also the sort toggle to the right is disabled for the object ID field so there is no way to test to see what is happening. Please refer to images:

CorrectOrder.png

 

 

This is the correct drawing order (from the Web AppBuilder app with the classic map viewer)

 

 

 

 

 

 

IncorrectOrder.png

 

 

The layer drawing order is incorrect. (from newer Map Viewer and Experience Builder). The point furthest to the top should be red and the second point from the bottom should also be red.

 

 

 

 

One more thing to add that I just noticed is that the drawing order changes when the map scale changes, so zooming in and out will cause the points to change color!

0 Kudos
3 Replies
RussRoberts
Esri Notable Contributor

Can you share the map?

0 Kudos
FranklinAlexander
Frequent Contributor

Link to current web app:  https://myfwc.maps.arcgis.com/apps/View/index.html?appid=87162eec3eb846218cec711d16462a72

Link to Experience Builder app: https://experience.arcgis.com/experience/1066021bd1024002852411581393d795/

It appears that when the EXB app first loads, the layer is drawn correctly, but as soon as I zoom in to an area the drawing order gets refreshed and the drawing order gets inconsistent.

 

Thank you!

0 Kudos
RussRoberts
Esri Notable Contributor

thanks, looks like a possible issue with the 4.x JSAPI. Would recommend creating a support issue

0 Kudos