<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: KML layer not able to parse KML return data in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235988#M6099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My bad. I had neglected a reference to the toolkit datasources library. Now that I have added that and coincidentally also upgraded to the 2.2 release of hte SL api, I am able to access some kml files. I have not however suceeded in accessing kmz files. I unzipped one particular kmz file to get at the kml file it contained and could not get the kmllayer to work with that either.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 21:00:39 GMT</pubDate>
    <dc:creator>TonyBacon</dc:creator>
    <dc:date>2011-06-27T21:00:39Z</dc:date>
    <item>
      <title>KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235986#M6097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to use the KmlLayer against &lt;/SPAN&gt;&lt;A href="http://wms.met.no/googleearth/metno.kml"&gt;http://wms.met.no/googleearth/metno.kml&lt;/A&gt;&lt;SPAN&gt; but get the following exception. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unhandeled exception System.Xml.XmlException: Invalid character in the given encoding. Line 48, position 16.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using version 2.1 RC of the API. The Toolkit.DataSources source available on codeplex does not include this class, so I'm not able to debug it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone who is able to make this service work, or provide any information on a fix?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 09:24:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235986#M6097</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2010-11-30T09:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235987#M6098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am experiencing the same thing. Wonder if you ever found a solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to be a timing/timeout issue for me. Watching in fiddler I notice that the error occurs before the httprequest has completed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 14:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235987#M6098</guid>
      <dc:creator>TonyBacon</dc:creator>
      <dc:date>2011-06-24T14:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235988#M6099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My bad. I had neglected a reference to the toolkit datasources library. Now that I have added that and coincidentally also upgraded to the 2.2 release of hte SL api, I am able to access some kml files. I have not however suceeded in accessing kmz files. I unzipped one particular kmz file to get at the kml file it contained and could not get the kmllayer to work with that either.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 21:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235988#M6099</guid>
      <dc:creator>TonyBacon</dc:creator>
      <dc:date>2011-06-27T21:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235989#M6100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That KML file has unicode characters in it. the KmlLayer class for Silverlight opens the files with UTF-8 encoding. If you encounter characters that aren't valid for UTF8 the parser will blow up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2011 02:06:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235989#M6100</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-07-03T02:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235990#M6101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apparently I have not been notified when this thread was replied to. I've updated to version 2.2, but the same problem still persists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to tell the system to use unicode encoding, in much the same way as you can with setting the culture for the thread? For some reason I doubt it, though it is worth asking anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will see what the beta for 3.0 can handle, as I don't feel like digging too deep into this right now. It would be very cool to get this working&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 15:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235990#M6101</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2011-11-10T15:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235991#M6102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can download the source for KmlLayer &lt;/SPAN&gt;&lt;A href="http://esrisilverlight.codeplex.com/"&gt;here&lt;/A&gt;&lt;SPAN&gt; and tinker with it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 15:11:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235991#M6102</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2011-11-10T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235992#M6103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can download the source for KmlLayer &lt;A href="http://esrisilverlight.codeplex.com/"&gt;here&lt;/A&gt; and tinker with it.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Already done so &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 15:29:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235992#M6103</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2011-11-10T15:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235993#M6104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To anyone from the ESRI team:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems like a few sources for KML have declared the encoding of the document to be different that what it actually is. When we don't have control of the source, it would be helpful if the KmlLayer could deal with this. The url in the first post is one such as this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this something that can be taken care of for the next release?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 15:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235993#M6104</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2011-11-10T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235994#M6105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The following code in the else statement of the SetSource method did the trick:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
StreamReader streamReader = new StreamReader(seekableStream);
string xml = streamReader.ReadToEnd();

 xLocalDoc = XDocument.Load(
#if SILVERLIGHT
 seekableStream
#else
 XmlReader.Create(new StringReader(xml))
#endif
, LoadOptions.None);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this can be added to the next version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The remaining problem seems to be that all graphics are placed more or less at lat/lon 0 (off the coast a little west of Gabon), though that is not the location of at least many of the features in the KML. Just started looking in to that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235994#M6105</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2021-12-11T11:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235995#M6106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bjonar, have you been able to work with kmz files? Most of the kml data that I hope to use in our map is compressed as kmz.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2011 20:55:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235995#M6106</guid>
      <dc:creator>TonyBacon</dc:creator>
      <dc:date>2011-12-23T20:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: KML layer not able to parse KML return data</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235996#M6107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Bjonar, have you been able to work with kmz files? Most of the kml data that I hope to use in our map is compressed as kmz.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry Tony, but I have not. So far we have only been working with KML for prototyping on what we might want to do, and I have only looked at the url from the initial post. But based on the speed on the data from that URL, I would very much like to have the data compressed :o)&lt;/img&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I do run across it, I will try to let you know. And hopefully vice-verca? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But by just guessing, I think KMZ is compressed using GZip. Without never having tried it, you could have a look at the &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx"&gt;GZipStream&lt;/A&gt;&lt;SPAN&gt; class. Update the source code for KmlLayer in the codeplex project to use the GXZipStream if the IsCompressed property of your updated class is true? Or use &lt;/SPAN&gt;&lt;A href="http://www.icsharpcode.net/OpenSource/SharpZipLib/?"&gt;SharpZipLib&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bjørnar Sundsbø&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Dec 2011 08:38:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/kml-layer-not-able-to-parse-kml-return-data/m-p/235996#M6107</guid>
      <dc:creator>BjørnarSundsbø</dc:creator>
      <dc:date>2011-12-24T08:38:10Z</dc:date>
    </item>
  </channel>
</rss>

