I am using the Google Maps API in an application. I use Google's autocomplete and the streets come out with accents, but when I pass them to the url to get the distance, it does not return anything.
This is the code:
str= "Calle Doctor José Montilla Bono, Jaén";
str2= "Gran Via, Calle Gran Vía de Colón, Granada";
String urlString = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=" + str + "&destinations=" + str2 + "&mode=driving&key=0000000000000000000";
Generate the query url: link
but the application fails me and if I open that url I get this:
{
"destination_addresses": [],
"origin_addresses": [],
"rows": [],
"status": "INVALID_REQUEST"
}
Does anyone know why it can be?
Thank you very much Greetings