3

for address url :

http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK&sensor=false

in this url betwn source and destination we can pass waypoints but how i can pass waypoints for kml url

http://maps.google.com/maps?f=d&hl=en&saddr=9.036597,77.536&daddr=8.919942,77.669208&ie=UTF8&0&om=0&output=kml

i have tried like this

http://maps.google.com/maps?f=d&hl=en&saddr=9.157283,77.544239&daddr=9.035239,77.784564&waypoints=9.036597,77.536|8.919942,77.669208&sensor=false&ie=UTF8&0&om=0&output=kml

but it is not worked so how i can pass waypoints multiple lat and long between source and destination?

John Conde
  • 217,595
  • 99
  • 455
  • 496
Girish Patel
  • 1,270
  • 4
  • 16
  • 30
  • This post can help you solving your problem. [http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo/11745316#11745316][1] [1]: http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo/11745316#11745316 – Festus Tamakloe Oct 12 '12 at 14:10
  • @girishce26 Did you solved this? – Noundla Sandeep Jul 12 '13 at 08:31

1 Answers1

0

There's no documented way to do that. The KML interface om maps.google.com isn't really an "API" like the Directions API with formal documentation and specs... it's just a commonly used service for simple requests.

Your best bet is to work with the JSON/XML from the directions service and transform it into KML (if you can't consume it directly).

bamnet
  • 2,525
  • 17
  • 21