Google Maps and Directions stopped plotting routes

0

I'm using google maps and directions and working. After 3 weeks two of my apps they use have stopped tracing the routes.

In the Google console, I left the API key unrestricted since the app was published to Google Play. I checked the quota and it's well below the limit.

Could it be some Google instability? I say this because 22.07.17 was working normally. And today is 23.07.17 this problem is happening.

In logcat, I took the url that it generates with origin and destination and accessed directly through the browser

 {
   "geocoded_waypoints" : [
      {
         "geocoder_status" : "ZERO_RESULTS"
      },
      {
         "geocoder_status" : "OK",
         "place_id" : "ChIJMa1nNVgYyZQReZx9b97Di4Q",
         "types" : [ "establishment", "point_of_interest" ]
      }
   ],
   "routes" : [],
   "status" : "NOT_FOUND"
}
    
asked by anonymous 23.07.2017 / 23:38

1 answer

0

I tested on another device and in another location and the error persisted. Since I use the Address class to fetch the address, it was returning at the end of the address the word null , causing it not to find the route.

Correcting this worked.

The code that was before (with bug)

origemDispositivo = enderecoUsuario.getAddressLine(0) + " "
                    + enderecoUsuario.getAddressLine(1) + ", "
                    + enderecoUsuario.getPostalCode();

Code after

origemDispositivo = enderecoUsuario.getAddressLine(0) + " "
                    + enderecoUsuario.getPostalCode();

What I think is that it had some update from Google, because as said before worked without problems. Anyway, that was it.

    
24.07.2017 / 22:14