AnsweredAssumed Answered

Custom renderer with AcceleratedDisplay

Question asked by miripsystematics-co-il-esridist Employee on Apr 29, 2014
Latest reply on May 6, 2014 by miripsystematics-co-il-esridist
Hello,

We've written a simple class that implements the IRenderer interface in order to create a renderer with our own logic.
The symbols the renderer returns are only symbols from within the API (mostly PictureMarkerSymbols).
When we turn the AcceleratedDisplay mode on, this stops working. The question is why? We are not using any WPF-based symbology, and only working within the API. To my understanding this is supposed to work.

What we are doing is, for instance, the very simple following thing:

    public class AdvancedSymbologyRenderer : IRenderer     {         public ESRI.ArcGIS.Client.Symbols.Symbol GetSymbol(Graphic graphic)         {             var symbol = new PictureMarkerSymbol() { Source = new BitmapImage(new Uri(@"C:\Icons\plane.png")) };             return symbol;         }     }


The error we are getting is the "classic" AcceleratedDisplay error, saying that the renderer cannot be serialized to JSON.
This occurrs as an ArgumentException when our renderer is passed to this method - ESRI.ArcGIS.Client.Runtime.NativeGraphicsLayer.UpdateRenderer().

Thanks,
Miri.

Outcomes