Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get Google Maps Directions using HTTP requests?

Is it possible to use the Google Maps API router just using HTTP? Something like http://maps.google.com?from=blah?to=blah

And have it return some sort of XML or JSON representing the directions?

like image 615
DevDevDev Avatar asked Dec 23 '09 19:12

DevDevDev


People also ask

How do I get Google Maps API directions?

Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.

Is Google Maps API free for website?

All Maps Embed API requests are available at no charge with unlimited usage.

Does Google Maps have an API?

The Google Maps Platform is a set of APIs and SDKs that allows developers to embed Google Maps into mobile apps and web pages, or to retrieve data from Google Maps.


1 Answers

There is no documented and approved method to access driving directions via an HTTP API request.

This makes it difficult to get driving directions on the server-side, which I assume is your intention.

Not only it is undocumented and difficult to achieve, but it would also violate the restrictions 10.1 and 10.5 of the Google Maps API Terms and Conditions.

However, if you don't mind the challenge, and you believe that rules are there to be broken, you may want to check these articles:

  • Calculate driving directions using PHP?
  • Retrieve driving directions from google maps with server-side HTTP calls and show results with static maps for WAP
like image 170
Daniel Vassallo Avatar answered Oct 07 '22 16:10

Daniel Vassallo