Hi,
I am using arcgis esri wpf api 2.2. I have loaded the KML file from local machine into KML Layer As below.
FileStream stream = File.OpenRead(omf.path);
KmlLayer kmlItemLayer;
FileInfo info = new FileInfo(omf.path);
string[] fileName = info.Name.Split('.');
using (stream)
{
kmlItemLayer = new KmlLayer()
{
ID = "KML-" + fileName[0],
};
kmlItemLayer.SetSource(stream);
};
BaseMap.Layers.Add(kmlItemLayer);
This displays the placemarks on the map, shows the graphics properly on the map, but I recevied following error.
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Symbol.TranslateX; DataItem=null; target element is 'TranslateTransform' (HashCode=35027383); target property is 'X' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Symbol.TranslateY; DataItem=null; target element is 'TranslateTransform' (HashCode=35027383); target property is 'Y' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Symbol.Heading; DataItem=null; target element is 'RotateTransform' (HashCode=20944767); target property is 'Angle' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Symbol.Scale; DataItem=null; target element is 'ScaleTransform' (HashCode=36758902); target property is 'ScaleX' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Symbol.Scale; DataItem=null; target element is 'ScaleTransform' (HashCode=36758902); target property is 'ScaleY' (type 'Double')
Then if try to retrieve graphics object to see what are the attributes by using kmlItemLayer.Graphics,
kmlItemLayer.Graphics is null (count=0).
If I get the attributes I need to set it as maptip for this kmlItemLayer.
Please help me with this issue. I really appreciate your help. Attached is KML sample file.
Thank you,
Sincerely
Vishakha