2
Good morning,
I’m making a site where users need to calculate the distance between two locations. Does anyone know how or where I can use a system that allows me to do this on my website?
2
Good morning,
I’m making a site where users need to calculate the distance between two locations. Does anyone know how or where I can use a system that allows me to do this on my website?
1
One of the options is to use the API do Google Maps
. It returns the distance between two addresses and the average time it takes between the two points.
http://maps.googleapis.com/maps/api/distancematrix/json?origins=99010030&destinations=99064090&mode=driving&language=pt-BR&sensor=false
{
"destination_addresses" : [ "São Cristovao, Passo Fundo - RS, 99064-090, Brasil" ],
"origin_addresses" : [ "Vila Popular, Passo Fundo - RS, 99010-030, Brasil" ],
"rows" : [
{
"elements" : [
{
"distance" : {
"text" : "4,7 km",
"value" : 4656
},
"duration" : {
"text" : "11 minutos",
"value" : 652
},
"status" : "OK"
}
]
}
],
"status" : "OK"
}
http://cbsa.com.br/post/distancia-entre-cidades---google-maps-javascript-api-v3.aspx
Browser other questions tagged google-maps maps
You are not signed in. Login or sign up in order to post.
That in which language?
– Joaquim Costa
Solved your problem?
– Matheus