dhillworld

Different types of ImageSource with PictureMarkerSymbol

Discussion created by dhillworld on Dec 6, 2012
Latest reply on Dec 6, 2012 by dhillworld
PictureMarkerSymbol takes an ImageSource as its Source property.

When I create a PictureMarkerSymbol using a valid BitmapSource, which is a descendent of ImageSource, I get a TargetInvocationExeption. The InnerException is as follows:


InnerException: System.NotSupportedException
       Message=Specified method is not supported.
       Source=ESRI.ArcGIS.Client
       StackTrace:
            at ESRI.ArcGIS.Client.Symbols.PictureMarkerSymbol.ToJsonInternal(Action jsonReady, Boolean& dataPending, Boolean nativeMapSerialization)
            at ESRI.ArcGIS.Client.Symbols.PictureMarkerSymbol.ESRI.ArcGIS.Client.IJsonSerializableAsync.ToJson(Action jsonReady, Boolean& dataPending)
            at ESRI.ArcGIS.Client.JsonSerializableExtensions.SerializeToJson(Object o, Action jsonReady, Boolean& dataPending)
            at ESRI.ArcGIS.Client.Runtime.NativeGraphicsLayer.GetSymbolJson(Graphic graphic, Action jsonReady, Boolean& dataPending)
            at ESRI.ArcGIS.Client.Runtime.NativeGraphicsLayer.AddGraphic(Graphic graphic, Geometry displayGeometry)
            at ESRI.ArcGIS.Client.Runtime.NativeGraphicsLayer.AddGraphics()
            at ESRI.ArcGIS.Client.Runtime.NativeGraphicsLayer.Initialize()
            at ESRI.ArcGIS.Client.NativeMap.AddLayer(Int32 index, Layer layer)
            at ESRI.ArcGIS.Client.DrawingSurface.AddLayer(Int32 index, Layer layer)
            at ESRI.ArcGIS.Client.AcceleratedDisplayLayers.TryAddLayerToDrawSurface(Layer layer, Int32 index)
            at ESRI.ArcGIS.Client.AcceleratedDisplayLayers.Draw(Envelope extent, Double resolution, MapPoint canvasOrigin, Boolean useTransitions, Boolean isContinuous)
            at ESRI.ArcGIS.Client.Map.loadLayerInView(Boolean useTransitions, Envelope drawExtent, Layer layer, Boolean isContinuous, Double scale)
            at ESRI.ArcGIS.Client.Map.loadLayersInView(Boolean useTransitions, Envelope drawExtent)
            at ESRI.ArcGIS.Client.Map.Layers_LayersInitialized(Object sender, EventArgs args)
            at ESRI.ArcGIS.Client.Map.<>c__DisplayClass10.<Layers_LayersInitialized>b__e()
       InnerException:


Is PictureMarkerSymbol depending on ImageSource being a BitmapFrameDecoded?  I forgot to mention that this is in the WPF Runtime SDK 1.0.

Outcomes