-
Notifications
You must be signed in to change notification settings - Fork 48
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
Google My Maps incompatibility #8
Comments
Have you tried serializing the root object as a If you're still stuck post some code and I'll try to help |
I tried the technique you suggested, but I still get the namespace prefixes. This code takes the KML out of my input KMZ file, and serializes it back out again:
|
Do you have a small sample KMZ file that reproduces the issue that you're allowed to share - I'm guessing the namespaces that are being read are different to what the library is expecting so it's trying to preserve that information when serializing it. |
Sure. Here is a KMZ exported from desktop Google Earth and the KML (with namespace prefixes) that results from running the code in my earlier comment. |
Thanks for that, it looks like the input has the KML namespace declared twice, which we're trying to preserve when serializing and is causing problems:
Let me take a look and see how we can handle that, so far not having much luck with the XmlWriter to get it to do the right thing (the easy option would be to not serialize the |
This is now fixed in 3.0.5 (well, it works on my machine 😇) - thanks for your help reporting and providing sample data that was able to reproduce the problem! |
Looks good here, too. Thanks for the quick response. |
I noticed that Google My Maps will not import KML generated by SharpKML ("The file contains invalid or unsupported data, or the file is too large to parse.") However, it will import the same KML data that has been imported and then exported through the desktop version of Google Earth.
This seems to be caused by the "kml:" namespace prefix that SharpKML adds to every element. Stripping off these prefixes using a text editor makes the file acceptable to Google My Maps. Can the prefix generation be made optional?
The text was updated successfully, but these errors were encountered: