Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

Alright, so 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 -->
  </SimpleField>
</Schema>

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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