The Baidu Map Geocoder would need to receive addresses in a particular order that corresponds to Chinese addresses formats.
In other words, currently, the function geocoder_widget_parse_addressfield, aggregates addressfield components in a certain order: premise, thoroughfare, locality, administrative_area, sub_administrative_area, country, postal_code, which doesn't really match with Chinese addresses order and typical formats.
We would most likely need to copy this function and simply change the order in which components should be aggregated to obtain the standard order in which components are usually displayed for Chinese addresses.

This function would then be used for the Geocoding of the addressfield by the Baidu Geocoder.

Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of bug report, 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 function geocoder_widget_parse_addressfield_china which is pretty much just a copy/paste of the original geocoder_widget_parse_addressfield with a different order of aggregation of addressfield components:
country, administrative_area, locality, thoroughfare, premise, sub_administrative_area, postal_code

This function is now used by the Baidu Geocoder to provide addressfield values in a standard format of Chinese addresses.

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

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 efdf93c (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!

Status: Fixed » Closed (fixed)

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