Select to view content in your preferred language

Change Selection FeatureLayer Color Kotlin 200.8.1

265
1
04-28-2026 02:35 AM
ValerioQuintarelli85
New Contributor

Hi, I'd like to set two selection colors in my map (one for one FeatureLayer type and one for another). The documentation says this is deprecated:

ValerioQuintarelli85_0-1777368837828.png

 

 

 

 

but it's still possible. However, I can't figure out how to interact with the featurelayer to change the selection color. Could you please help?

Tags (2)
0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

Hello @ValerioQuintarelli85. Thanks for the question.

I'm afraid you've found some old documentation that slipped through the cracks. Per-layer selection color was deprecated in 2019 and has been removed. We will fix the doc, and I apologize for the inconvenience!

The short version is that we have not supported different selection colors since 100.4.

We found that it impacted performance and impaired our ability to deliver new features. You can read more about that in the Selection behaviour changes in Runtime 100.5" blog post from 2019.

Again, sorry for giving you false hope and having you dig around the API for things that no longer exist!

If your use case allows you to only select features from one layer at a time, you could dynamically change the overall selection color as the user selects features from each layer, but if you need to support two separate selection colors being displayed at the same time with features selected from multiple layers, the selection capabilities won't work for you. Let me know if that's the case, and a little more about the layer types (points? lines? polygons?), and I can try to come up with some suggestions.

0 Kudos