Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reading simple ExtendedData tag #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

swoolcock
Copy link

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
Copy link
Author

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:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant