Unfortunately, the Baidu Geocoder doesn't seem to support as many features as the Google Geocoder.
The main difference is that Baidu would return at most a single location result, no matter how generic the request could be (for example, 火车站 / Train station), when Google Geocoder could return multiple results with various precision/approximation/filtering parameters or Geometries. With a single point returned at most, fewer supported properties, unfortunately, Geometry Types, such as Bounds or Viewport and other filtering parameters provided by Google don't seem to be currently supported by Baidu Geocoder.
However, for the single geocoded result returned by Baidu Geocoder, there is a defined property called precise, which could most likely be used for configuration to enforce/retain only results with a precision to TRUE.
A field settings form could allow users to configure whether to keep all results or only the ones with a precise value to TRUE (Precise results), if the widget "Geocode from another field" is selected, pretty much like Google Geocoder does it, see geocoder_google_form in google.inc line 148.
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
Comment #1
xiukun.zhou commentedQuick follow-up on this feature request:
Added a new configuration settings form for the field to allow users to select whether to Only keep precise results.
If this option is checked for the configuration of the Geofield with the widget "Geocode from another field", then any result returned by the Baidu Geocoder that would not be precise would be rejected (modified baidu.inc to take into account this logic, see baidu.inc line 94).
I went ahead and committed the changes against the 7.x-1.x branch at 1c920f8.
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 1c920f8 (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.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!