2

when i am finding the alternative paths between two places using google API, i am getting different results. For the same origin and destination i get different number of routes between them and the alternative path also differs for different searches.

Am i missing anything?

Why there is difference?

https://maps.googleapis.com/maps/api/directions/json?origin=jaffna&destination=galle&sensor=true&alternatives=true&units=metric&mode=driving&key=YOUR_API_KEY

This is how i used API...

smga08
  • 614
  • 5
  • 12
  • 1
    Show us how you use this API and also look at the documentation of the API in order to get more details and update your question accordingly. – Jeroen Heier May 31 '18 at 03:51
  • check your direction API call in that you do something that affects your route options. check this link for the more information: https://developers.google.com/maps/documentation/directions/intro#RequestParameters – Mahesh Keshvala May 31 '18 at 05:24
  • @JeroenHeier i added the way of API used... Is there any mistake in that? – Angathan Nesarasa Jun 01 '18 at 06:27
  • I've removed your API key from your question. Please don't share private API keys on public sites, and make sure you restrict them according to this documentation: https://developers.google.com/maps/api-key-best-practices#restrict_apikey – smga08 Feb 18 '20 at 02:00

0 Answers0