Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had implemented the same example and was facing the same problem. </p> <p>What your application does is to retrieve a document from google servers and then look in that document for the directions. Although the kml document (the one that your code wants to retrieve) used to work a few months (like when that tutorial was written,)now it does not work since the google updated their API in December 2012. </p> <p>Solution : your URL appears to be deprecated. Instead of kml, Google maps uses JSON and XML. Look at this <a href="https://developers.google.com/maps/documentation/directions/" rel="nofollow">page</a> for using web services.</p> <p>Now,</p> <p>1) Create a URL AS PER THE GUIDE on these web services.</p> <p>2) Now send a HTTP Connection request to the google servers and you must get an Inputstream.</p> <hr> <p>Your question is over, but if you are using the same code after solving this problem you will get another problem of parsing the received document.</p> <p>Solution to the second problem : </p> <p>1) Save the document in the sdcard of cellphone and view it manually. A guide to store the document is <a href="http://developer.android.com/guide/topics/data/data-storage.html#filesExternal" rel="nofollow">here</a>.</p> <p>2) find the directions in the document according to the XML output section on <a href="https://developers.google.com/maps/documentation/directions/" rel="nofollow">this</a> page.</p> <p>3) Retrieve those directions using a DocumentBuilderFactory or otherwise. </p> <p>your application looks for the tag "LineString" in the kml document. However, since now you are using XML or JSON, look for the relevant tags as given in the guide.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload