Change brightness of FeatureLayer

91
2
05-23-2019 05:13 AM
Highlighted
New Contributor III

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?

Reply
0 Kudos
2 Replies
Highlighted
Occasional Contributor III

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.

Highlighted
New Contributor III

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?

Reply
0 Kudos