Closed (fixed)
Project:
Geolocation Field
Version:
8.x-2.x-dev
Component:
Geolocation Field / Backend
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2017 at 12:43 UTC
Updated:
11 Mar 2019 at 09:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
peacog commentedHere's a patch that adds country-specific handling of administrative area for Spain.
Comment #3
adarkling commentedMaybe this should be broken out into a separate function, because there're some other countries that would have similar problems.
Comment #4
rakesh.nimje84@gmail.com commentedI am also facing this problem in case of country is India.
Comment #5
christianadamski commentedThe underlying issue is, there is no public documentation to be found, that maps the single address elements, to the components.
Example:
- In the US, the 'address line 1' would be filled as "[house number] [street name]". In Germany the correct format is "[street name] [house number]"
The address module takes address structure data from a Google github project, which for example provides data on whether administrative area is a required component for a postal address in a country. But not the detailed address element <-> component mapping as described above. There simply is no public source for that. Or at least I didn't find any.
So to tackle this, we will have to provide a custom AddressMappingService and add requirements as they come to it. I will write something up, but it may take a little longer.
Comment #6
marassa commentedI did a little research for my project and found that the "number first" format is used in major English speaking countries (US, UK, Canada, Australia, NZ, Ireland) plus France while the "number last" is used in most of the rest of the world. But I did not research Asia, Africa and various island states as those were not relevant to my project. Anyways, at least for my project spanning dozens of countries in Europe (including Russia and post-Soviet space) and both Americas, it seemed a better idea to make the "number last" format the default and maintain a relatively short list of countries using "number first".
Comment #7
christianadamski commentedWill be fixed in 2.x
Comment #8
christianadamski commentedYou can simply write GeocoderCountryFormatting plugins in 2.x for this specific requirement. I added one for Spain. Go ahead and test please.
Considering this fixed.