Kml.swift icon indicating copy to clipboard operation
Kml.swift copied to clipboard

Add support for reading simple ExtendedData tag

Open swoolcock opened this issue 8 years ago • 1 comments

Added support for untyped ExtendedData, as per: https://developers.google.com/kml/documentation/extendeddata

In your doc.kml:

<Placemark>
  ...
  <ExtendedData>
    <Data name="foo">
      <displayName>Display</displayName>
      <value>bar</value>
    </Data>
  </ExtendedData>
  ...
</Placemark>

Swift code to access the extended data:

let value = placemark.extendedData?.data["foo"]?.value
let displayName = placemark.extendedData?.data["foo"]?.displayName

swoolcock avatar Mar 16 '17 03:03 swoolcock

Added a link from KMLAnnotation to KMLPlacemark so that the extended data can be accessed when building up the annotation view in MKMapViewDelegate.mapView(_:viewFor:)

swoolcock avatar Mar 16 '17 22:03 swoolcock