amachadoubi

Generating an image representation for a layer

Discussion created by amachadoubi on Jun 29, 2011
Latest reply on Jul 8, 2011 by JNery-esristaff
Hello!

With ArcGIS for Silverlight I can use the ToBitmap() method from the Layer class to generate a bitmap. So I can use the result as a thumbnail for my layer. With the WPF version I don't have this method. I can use the RenderTargetBitmap class to generate an image from the Map because it inherits from the Visual base class. But I don't want to take the whole map representation... I need one for each layer. The Layer class is not a Visual, so I can't render it as an image (at least not as easily as I can with the map).

I saw that the Layer class has a Canvas property. That's a LayerCanvas that inherits from a Panel and it should work. But the problem is: it's an internal property.

So just to sum up my problem: how to generate an image representation for a layer? Not the whole map... just one layer at time...! Should I just use reflection to access this property? Are there any other solutions?

Thank you!!

Regards,

Andre

Outcomes