Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
219 views
in Technique[技术] by (71.8m points)

use Google My Maps with geoxml3

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...