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
nit: README.md example should use Document(…) #1
Comments
Thanks for the feedback! This example is taken from the first example in the KML tutorial. From my understanding of the KML specification, a
Does Google Earth emit an error when importing the example? |
Ah, sorry, I must have modified the example to include multiple placemarks. Just tried to reproduce this, and Google Earth indeed accepts the example file as-is. So, it would still be good to change it to be more easily extensible, I think, but it’s clearly not a bug — up to you :). |
Thanks for following up :) The package is designed as a thin wrapper for generating KML documents. "Protection against generating invalid documents" and "concealment of KML complexity" are explicit non-goals. I like the 1:1 mapping between examples in the package and examples in the KML tutorial. It would be awesome if the library were able to catch more errors at compile time (e.g. if A second option would be to add a function to validate the KML structure. As this could be done at runtime, it would make fewer demands on Go's type system. I'll open issues for both of the above, but close this issue as "working as intended" for now. |
Thanks for this useful library!
I noticed that the example from README.md cannot be imported into Google Earth as-is because it nests Placemarks underneath the
<kml>
tag, whereas it should nest them underneath a<Document>
tag.Other examples are correct in that regard, but it would be good to fix this one, too, I think :)
The text was updated successfully, but these errors were encountered: