localgovdrupal / localgov_geo

Entity for storing Geographic information, addresses, and areas; extensible types and plugable backends with defaults to start.
2 stars 1 forks source link

Generalize addressfield <-> geocoder mapping #31

Closed ekes closed 1 year ago

ekes commented 3 years ago

At the moment the order of fields when incoming from a geocoder is hard coded to UK - Ireland format (House number then Street in particular). Gecoder module does the European format (Street House number). There's not simple mapping for this https://github.com/commerceguys/addressing/issues/138 but an event could be set up to (a) default format order based on submitted suggestions (b) allow users to tweak it for individual site requirements.

Equally geocoder provides an address service that uses the addressfield postal formatter to flatten the address fields into a string to send to the geocoder. Anecdotally (I've not spent ages testing) this works better with ',' commas between the lines. Rather than a service an event might be nice for this?

ekes commented 1 year ago

Fixed in https://www.drupal.org/project/geo_entity/issues/3339629