简体   繁体   中英

How can I use Google Maps geocoder in an angularJs datatable without Exceeding the quota limit

I have a datatable in whch I need to find a city name based on lat and lng. I'm trying to use Google maps geocoder in order to reverse coding latitude and longitude into city name. I created a function to do that but I'm getting limit rate exceeded since I have a lot of rows in the datatable.

Is there any way to call the geocoding function only for current active pagination ?

The geocoding API has rate limit of 50 requests per second and 2,500 per day, calculated as the sum of client-side and server-side queries.

What you should do is add some delay or interval between you geocoding requests in javascript. Maybe a few milliseconds. Just enough so that you are not exceeding 50 requests per second.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM