ThinkGeo.com    |     Documentation    |     Premium Support

Set Opacity at the Layer level?

Hello, 


I've been setting Opacity at the Overlay level and it's been working great. But now I have an InMemoryFeatureLayer that I use to highlight features and I'd like to set the Opacity on it. Is there any way to do this at the layer level? 


As a workaround, I can put the rest of my layers in the StaticOverlay and put my highlight layer in my DynamicOverlay and set the Opacity on just the DynamicOverlay. I just didn't know if there was an easier way to accomplish this. 


Thanks for your help,


Joe



Joe, 
  
 It’s easy to make it transparent in a layer’s level. You know when we set the style of a layer, we need to set the color, there we can set the opacity. We can use GeoColor.FromArgb and input the Alpha, Red, Green, Blue or even simpler, we can input the Alpha and a GeoColor as the base color.  The Alpha value is from 0 to 255, 255 means concrete color and 0 means totally transparent. 
  
 Thanks, 
  
 Ben.

Thanks Ben!  That's much easier and works great.



It’s my pleasure, Joe.