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
253 views
in Technique[技术] by (71.8m points)

iphone - Google Maps output=kml broken?

All

I was using the google maps KML output in my iPhone app. If I type the following on my browser, it used to give an option to save the kml file:

http://maps.google.com/maps?q=restaurant&mrt=yp&num=10&sll=37.786945,-122.406013&radius=5&output=kml

But all of a sudden today, it is returning an html file. What happened? any ideas? I use it in my iPhone app and it is throwing error as it is not a valid xml returned. Obviously....

Thanks, mbh

Question&Answers:os

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

1 Reply

0 votes
by (71.8m points)

This way of extracting the Google Directions from Google by parsing the KML file is no longer available since 27 July 2012 (because Google has changed the structure of retrieving Google Directions, now you can only get it by JSON or XML), it is time to migrate your code to JSON instead of KML.

See the answer (for Android only but maybe for iPhone can understand the algorithm and apply it) in my own question here.


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

...