use Google My Maps with geoxml3

社会主义新天地 提交于 2019-12-11 16:26:12

问题


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:

  1. download the "network link" kmz file
  2. That KMZ includes the following link:

    http://mapsengine.google.com/map/kml?mid=zRlyQCuWJlxY.kzodUy9plTB0&lid=zRlyQCuWJlxY.kcCknmQlcl24

  3. That link redirects to

    https://mapsengine.google.com/map/kml?mid=zRlyQCuWJlxY.kzodUy9plTB0&lid=zRlyQCuWJlxY.kcCknmQlcl24

  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!