Google Maps and Directions stopped tracing routes

Asked

Viewed 269 times

0

I’m using google maps and Directions and running. After 3 weeks two of my apps that use stopped tracing routes.

On the Google console, I left the API key unrestricted since the app’s publication on Google Play. I checked the quota and it’s well below the limit.

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

In logcat, I got the url it generates with source and destination and I downloaded it directly from the browser

 {
   "geocoded_waypoints" : [
      {
         "geocoder_status" : "ZERO_RESULTS"
      },
      {
         "geocoder_status" : "OK",
         "place_id" : "ChIJMa1nNVgYyZQReZx9b97Di4Q",
         "types" : [ "establishment", "point_of_interest" ]
      }
   ],
   "routes" : [],
   "status" : "NOT_FOUND"
}

1 answer

0

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

Fixing it worked out.

The code that was before (with bug)

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

Code later

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.