Select to view content in your preferred language

Overlapping graphics within one layer

495
1
05-31-2024 03:24 AM
AndrewAE
New Contributor

Hello!
The map has a FeatureLayer with graphics from an array of client-side features, I expect fairly standard behavior: when you click on a graphic object, it appears at the top and overlaps all other graphic objects that are also located on this layer.
Unfortunately, this behavior is not expected by default settings; perhaps there are some tools to control the overlay within one layer?

By analogy with layers, I tried to change the order of graphic objects in the array, but this did not give results. 
I also tried setting the orderBy field to the layer and changing the required field for the graphic object when selected

0 Kudos
1 Reply
BlakeTerhune
MVP Regular Contributor

Could you make another GraphicsLayer for display? When a graphic in the "base" layer is clicked, you add it to the "display" layer (above the base). Then remove it from the "display" layer when something else is clicked.

0 Kudos