问题
I'm wondering what is the best way to use the data from Googles' My Maps with geoxml3. At the moment it is only possible to export kmz data format from My Maps. I used the exported kmz with the geoxml kmz version (http://geoxml3.googlecode.com/svn/branches/kmz/) but couldn't make it work (but it worked when I loaded it in Google Earth and saved it again as kmz!). I also tried it with the network link to My Maps (which I would like best), but no success, just got the message "XMLHttpRequest cannot load http://www.google.com/maps/d/kml?mid=........." . Google doesn't semm to allow this anymore?
best greetings from Berlin ralf
回答1:
Google is making it harder to do this. It works directly with KmlLayer
If I do the following, I can display the data using geoxml3:
- download the "network link" kmz file
That KMZ includes the following link:
http://mapsengine.google.com/map/kml?mid=zRlyQCuWJlxY.kzodUy9plTB0&lid=zRlyQCuWJlxY.kcCknmQlcl24
That link redirects to
https://mapsengine.google.com/map/kml?mid=zRlyQCuWJlxY.kzodUy9plTB0&lid=zRlyQCuWJlxY.kcCknmQlcl24
I can download that KMZ file, but it doesn't work directly with geoxml3, I need to unzip it and zip it up again. I think it is because the zip branch of geoxml3 doesn't support the particular kind of zip encoding google is using.
example of KMZ
example of KML
来源:https://stackoverflow.com/questions/29865772/use-google-my-maps-with-geoxml3