Use field as color for featurelayer

680
2
02-27-2017 01:22 AM
KevinHaeni
New Contributor III

Hi

My featurelayer includes a COLOR field containing an RGB-code. Is it somehow possible to color all features according to their COLOR field value, without having to statically map all the possible colors with a UniqueValueRenderer?

Tags (1)
0 Kudos
2 Replies
FC_Basson
MVP Regular Contributor

Can't see why not.  You'll have to load the features first, then iterate through all of them to read the "color" attribute and set the feature's symbology.

RobertScheitlin__GISP
MVP Esteemed Contributor

Just to add to FC's reply you can do a distinct value query first to get the values you want for your renderer instead of iterating though all the features.