Google Directions Service doesn’t account for requests made with my key api

Asked

Viewed 97 times

2

I’m using the same javascript reference both to use the Directions service and the maps api:

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=MINHA_CHAVE"></script> 

Requests made to the maps api are being accounted for normally. Each time I open a screen that loads the maps, the counter in google console is incremented instantly:

inserir a descrição da imagem aqui

The problem is that the requests made to the Directions api (directionsService.route()) are working normally but are not accounted for.

I imagine this could cause problems in the future if I exceed the limit and do not pay... maybe the server is blocked.

Note. I haven’t activated Billing yet.

1 answer

2


Okay, I figured out why the route() calls don’t count. This Directionsservice that I am using is the built-in version within the Maps Javascript API, so it is subject only to the limitation of that service that is 25,000 map loads per day, ie open a map of google 25000 times, regardless of zoom, map browsing, etc... only counts the map load.

Otherwise, the only limitation of Directionsservices within the javascript api is calls per second. The first ten calls can be within a second, but the subsequent ones should wait for a longer period between a call and another and if you try to request in a very short interval you will receive the error status 'OVER_QUERY_LIMIT'. The biggest delay needed comes to a second by my tests.

For number of calls per day or per month there is no limit on the use of Directionsservice.route(), so it is not accounted for in the google Speed Manager.

Browser other questions tagged

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