V2.3 KML Support

460
4
11-21-2011 05:03 PM
Labels (1)
linusang
New Contributor II
Hi I'm not sure I'm using the KML layer correctly... i tried a simple example.. but can't seems to render anything on the map..

<esri:Map WrapAround="True" x:Name="MyMap">
            <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:KmlLayer ID="KmlLayer" Url="C:\Users\user\Desktop\GVPWorldVolcanoes.kml"/>
</esri:Map>


the kml is just this
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<NetworkLink>
 <name>Global Volcanism Program - Holocene Volcanoes</name>
 <open>1</open>
 <Snippet maxLines="0"></Snippet>
 <description>All known volcanoes with an eruption during the Holocene Period (last 10,000 years). Compiled by the Global Volcanism Program.</description>
 <Link>
  <href>http://www.volcano.si.edu/ge/GVPWorldVolcanoes-List.kmz</href>
  <refreshMode>onInterval</refreshMode>
  <refreshInterval>604800</refreshInterval>
 </Link>
</NetworkLink>
</kml>


it opens in Google Earth fine.. downloading the data from http://www.volcano.si.edu/ge/GVPWorldVolcanoes-List.kmz. is this supported in the new V2.3?
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
The problem appears to be that the file is not utf8 encoded.
The KML file inside http://www.volcano.si.edu/ge/GVPWorldVolcanoes-List.kmz is encoding the 'î' of the placemark 'Chaîne des puys' as the character ASCII 238 (EE in Hexa).
This is not the expected value for an UTF8 encoding.
0 Kudos
linusang
New Contributor II
so is there going to be a fix? :confused: i actually post this problem here already... http://forums.arcgis.com/threads/22462-Error-adding-KML-Layer
0 Kudos
DominiqueBroux
Esri Frequent Contributor
In my opinion, the kml file you reference is badly encoded and, at this time, nothing is planned to support this kind of file.

That being said, if it turns out that it's a frequent case, we could be more tolerant to this kind of error.
We might envisage that for a future version bit without any guarantee for now.

The workaround is you to get the kml layer sources on codeplex, and that you tweak them to recover from this error.
0 Kudos
linusang
New Contributor II
thanks for the reply but ArcGIS Explorer loads the KML just fine... so I assume that we have the same  level of compatibility in ArcGIS products....
0 Kudos