title: How do I pass origin and destination co-ordinates to the Google Maps directions API?
body: <p>I'm using the google maps api for directions but i'm having problems when i try to send the origin and destination as coordinates.it says in the documentation that i can do that</p>
  
  <p><a href="http://code.google.com/apis/maps/documentation/directions/#RequestParameters" rel="noreferrer">http://code.google.com/apis/maps/documentation/directions/#RequestParameters</a></p>
  
  <p>but i am not sure of the format because it keeps giving me errors</p>
  
  <pre><code>Uncaught Error: Invalid value for property &lt;origin&gt;: [object Object]
  </code></pre>
  
  <p>i tried like so:</p>
  
  <pre><code> {"Ja":27,"Ka":45}
   {latitude:27,longitude:45}
  </code></pre>
  
  <p>And all of the possible combinations above but still gives error which is weird because the objects are identical with the ones i should be sending.</p>