Too many calls to Google Geocode API
Description
The Google API console is reporting Geocoding API usage to be much higher than expected. We're making more than 8000 requests per day despite it being a low-traffic and rarely-edited website. Need to understand why so many calls to the Geocoding API are being made and what we can do to limit them without disabling the plugin functionality.
Steps to reproduce
Can't reproduce yet. Would be great if you can help understand how to find the source of the excessive requests.
Additional info
- Craft version: 3.2.10
- Maps version: 3.7.7
- PHP version: 7.2.34
- Database driver & version: mysql Ver 14.14 Distrib 5.7.28, for macos10.14 (x86_64) using EditLine wrapper
- Other Plugins: Cache Flag 1.0.3 Contact Form 2.2.5 Contact Form Extensions 1.1.7 Contact Form Honeypot 1.0.2 CP Field Inspect 1.0.7 Element Index Defaults 1.0.3 Environment Label 3.1.5 Expanded Singles 1.0.7 Imager v2.1.10 Inventory 2.0.3 Maps 3.7.7 Minify 1.2.9 Obfuscator 1.0.3 Redactor 2.3.3.2 Redirects 3.1.23 Relabel 1.3.4 Retcon 2.0.12 Section Field 1.1.0 SEOMate 1.1.4 Sheets to Tables 1.0.0 Site Switcher 2.1.0 Twig Perversion 2.1.0
@architchandra Is geocoding happening exclusively in the admin, or are you doing some on the frontend? If in the admin, are the entries being regularly resaved?
It might be worth trying adding the following to your general.php config.
'disablePopulateMissingFieldData' => true,
I don't think we're doing any geocoding on the front-end. We're just using latlng values stored in the DB once the entry is saved and using the same to add markers to the map (which shouldn't make extra geocode requests, right?).
On the admin side, we're not saving entries regularly. The site is not edited frequently, nor do we have some process running to keep re-saving entries.
'disablePopulateMissingFieldData' => true, should be added to general.php or the simplemap.php config file?
Sorry - simplemap.php