Change brightness of FeatureLayer

672
2
05-23-2019 05:13 AM
GonzaloMuöoz
Occasional Contributor

I've got an offline (local) map in case the online one fails. I get the local maps and I create a Geodatabase per each file, and then I create a FeatureLayer being the FeatureTable of the featurelayer the geodatabase. Finally I assign the LayerCollection of FeatureLayers to the BaseMap.BaseLayers.

My problem is that I need to adjust the contrast, gamma y brightness as with the WmtsLayer but I cannot. I've tried to cast the FeatureLayer to a Layer and then to ImageAdjustmentLayer but it returns and InvalidCastException.

How can I do this?

0 Kudos
2 Replies
PreetiMaske
Esri Contributor

Unfortunately, properties : Brightness,Gamma, Contrast are not available on FeatureLayer. The layer type must be of type ImageAdjustmentLayer for these properties to work. FeatureLayer can't be casted to ImageAdjustmentLayer as you have already noted.

If you are not planning to edit these layers then you could create  .tpk or vtpk or look at other offlinemap alternatives but whatever you choose layer type would still have to be of type ImageAdjustmentLayer.

GonzaloMuöoz
Occasional Contributor

I need to adjust those properties for the offline map. Which one is the correct option to use offline maps allowing me to change those properties?

0 Kudos