I have a KML file I'd like to load with the KmlLayer in my Silverlight application. The problem is that the markup seems more complicated than the class wants to handle. I have a element at the top of the Document that adds custom elements () and for some reason changes the element name to a custom one.

I've been searching for a couple days but no one seems to have covered this issue. Has anyone here come across a option or somesuch you can set so that the KmlLayer notices and adheres to the elements customizations?


Apparently the 2.2 spec has dropped this strange @parent attribute from Schema. Why you would want to rename <Placemark> is beyond me anyway... In addition, custom elements are supported in KmlLayer with <ExtendedData> and not <Schema>... Looks like I'll have to consult the KML author about how they're formatting things.

<Schema name="string" id="ID">
  <SimpleField type="string" name="string">
    <displayName>...</displayName>            <!-- string -->

The short answer it seems is that the WmsLayer as of API v2.4 really only supports custom elements implemented via the <ExtendedData> tag. You can access this information with some tricky code that handles Toolkit.DataSources.Kml.KmlExtendedData class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.