Looking closer at the Geocoder module and more particularly the file google.inc, it would seem an issue was reported: #1672742: Avoiding OVER_QUERY_LIMIT due to more than 5 requests in a second in google geocode.

To prevent the same types of issues to happen when many values are provided for a field, to be Geocoded with Baidu Geocoder, we could add the exact same changes to the module: A customizable delay to be used between different Geocoding requests sent to Baidu.

Again, this would seem like a very straight forward change, since all the work has already been done in google.inc, line 27.

Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of feature request, I would be glad to provide more information or explain in more details.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Comments

xiukun.zhou’s picture

Status: Active » Fixed

Quick follow-up on this feature request:

Added a new configuration field Delay between Baidu geocoding requests (in milliseconds) on the Baidu Map Settings form page to allow users to configure a delay between each Geocoding requests sent to Baidu.
Code was also modified accordingly in the Baidu Geocoder file, see baidu.inc, line 48.

Any issue related with sending too many requests at once to the Baidu Geocoder, could now be fixed by adjusting the delay between Geocoding requests.

I went ahead and committed the changes against the 7.x-1.x branch at 740b8d9.

I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this issue or related commit 740b8d9 (we would surely be happy to hear your feedback).

Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commit or this feature request in general, I would be glad to provide more information or explain in more details.

Many thanks to @DYdave for digging out this feature request from Google's Geocoder module integration and adapting it to match with the module.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!

xiukun.zhou’s picture

Status: Active » Fixed

Forgot to remove the variable geocoder_baidu_delay that was added in commit 740b8d9:
Committed geofield_baidu_map.install file at 1e00a08.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.