Open kprajapatii opened 4 years ago
OSM has all the data available in pieces. Member asks if it is possible to have some kind of template system to put the parts in the correct order.
This is a very common request from Germ members who are adamant about formatting the address the German way.
Example:
AddressFormats = [{
format: [
["housenumber", "street"],
["city", "postcode"]
]
}, {
countryCodes: ["au"],
format: [
["unit", "housenumber", "street"],
["suburb", "state", "postcode"]
]
}, {
countryCodes: ["gb"],
format: [
["housename"],
["housenumber", "street"],
["city", "postcode"]
]
}, {
countryCodes: ["ie"],
format: [
["housename"],
["housenumber", "street"],
["city"],
["postcode"]
]
}, {
countryCodes: ["at", "ch", "de", "si", "pl"],
format: [
["street", "housenumber"],
["postcode", "city"]
]
}, {
countryCodes: ["ad", "ba", "be", "cz", "dk", "es", "fi", "gr", "hr", "is", "it", "li", "nl", "no", "pt", "se", "sk", "sm", "va"],
format: [
["street", "housenumber", "unit"],
["postcode", "city"]
]
}, {
countryCodes: ["fr", "lu", "mo"],
format: [
["housenumber", "street"],
["postcode", "city"]
]
}, {
countryCodes: ["br"],
format: [
["street"],
["housenumber", "suburb"],
["city", "postcode"]
]
}, {
countryCodes: ["vn"],
format: [
["housenumber", "street"],
["subdistrict"],
["district"],
["city"],
["province", "postcode"]
]
}, {
countryCodes: ["ca"],
format: [
["housenumber", "street", "unit"],
["city", "province", "postcode"]
]
}, {
countryCodes: ["us"],
format: [
["housenumber", "street", "unit"],
["city", "state", "postcode"]
]
}, {
countryCodes: ["tw"],
format: [
["postcode", "city", "district"],
["place", "street"],
["housenumber", "floor", "unit"]
]
}, {
countryCodes: ["jp"],
format: [
["postcode", "province", "county"],
["city", "suburb"],
["quarter", "neighbourhood"],
["block_number", "housenumber"]
]
}, {
countryCodes: ["tr"],
format: [
["neighbourhood"],
["street", "housenumber"],
["postcode", "district", "city"]
]
}, {
countryCodes: ["ua"],
format: [
["housenumber", "postcode"],
["street"]
]
}, {
countryCodes: ["cn"],
format: [
["postcode", "province"],
["city", "district"],
["street", "housenumber"]
]
}, {
countryCodes: ["bo"],
format: [
["street", "housenumber"],
["neighbourhood", "city"]
]
}, {
countryCodes: ["pe"],
format: [
["street", "housenumber"],
["neighbourhood"],
["city", "state", "postcode"]
]
}];
Hi @alexrollin , hi @kprajapatii and thank you for considering this!
In the above code:
{ countryCodes: ["at", "ch", "de", "si", "pl"], format: [ ["street", "housenumber"], ["postcode", "city"] ] }
this street format is the format of more countries. Is this code part of GD or it has to be implemented? Thank you a lot for taking this in consideration!
Greetings, Marius
Several customers have reported that they wish to have better integration with the maps APIs regarding specific address formats in use in their countries.
In these countries 'all addresses are always formatted a specific way with specific data in a specific order'
While it may be possible for some site admins to re-arrrange house number to be last in the street field, other admins with huge sites want the data that comes from the api to be formatted in the correct order/format, without requiring users or site admins to correct it.
Wehave had many many tickets from german members with this request and now from France. These requests are not the same, though. While DE needs housenumber in a different order, france needs the 'departement' data, similar to 'county' in the USA.
https://secure.helpscout.net/conversation/1856311005/31501/
For german task - they also want to change the order of the field input. In the address part of the add listing form, they want the zip code to be first, and then city, then region and then country.
Ticket ID: https://secure.helpscout.net/conversation/1830724606/30759?folderId=3844502
See https://wpgeodirectory.com/support/topic/openstreetmaps-auto-fill-selects-county-field-for-the-city-and-saves-it-as-city/#post-529948