How to show the route to follow in a web service?

-1

I have been working with js and php, I have been asked to create a webservice where by means of AJAX ask for the coordinates to display them on a map with the Google API.

All ready but I would like to know how to create a route to follow and that this is shown on the map.

I'm a real novice, here I am at zero.

    
asked by Jebux 18.07.2018 в 08:04
source

1 answer

0

On the same Google developers page, it explains a little bit about how to make the request to get the route you need to follow: Developer Guide

If I remember correctly (I no longer have access to that application) I used something like this:

https://maps.googleapis.com/maps/api/directions/json?origin=[origen]&destination=[destino]&key=[APIKEY]

Where origin and destination can be street names (spaces must change to +) or coordinates (latitude, longitude)

    
answered by 18.07.2018 в 08:40