Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further address-formats customization #3632

Closed
wants to merge 12 commits into from
13 changes: 11 additions & 2 deletions data/address-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
},
{
"countryCodes": ["vn"],
"format": [["housenumber", "street"], ["subdistrict"], ["district"], ["city"], ["province", "postcode"]]
"format": [["housenumber", "street"], ["subdistrict"], ["district"], ["city"], ["province", "postcode"]],
"customPlaceholders": ["subdistrict", "district", "city"]
},
{
"countryCodes": ["us"],
"format": [["housenumber", "street"], ["city", "state", "postcode"]]
"format": [["housenumber", "street"], ["city", "state", "postcode"]],
"customPlaceholders": ["postcode"]
},
{
"countryCodes": ["ca"],
Expand All @@ -38,6 +40,13 @@
{
"countryCodes": ["tw"],
"format": [["postcode", "city", "district"], ["place", "street"], ["housenumber", "floor"]]
},
{
"countryCodes": ["jp"],
"format": [["postcode", "province", "county"], ["city", "suburb"], ["quarter", "neighbourhood"], ["block_number", "housenumber"]],
"customPlaceholders": ["province", "county", "city", "suburb", "quarter", "neighbourhood", "block_number", "housenumber"],
"dropdowns": ["postcode", "province", "county", "city", "suburb", "quarter", "neighbourhood", "block_number"],
"widths": {"postcode": 0.3, "province": 0.35, "county": 0.35, "city": 0.65, "suburb": 0.35, "quarter": 0.5, "neighbourhood": 0.5, "block_number": 0.5}
}
]
}
39 changes: 38 additions & 1 deletion data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,40 @@ en:
# access=*
label: Access
address:
# 'addr:city=*, addr:conscriptionnumber=*, addr:country=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:place=*, addr:postcode=*, addr:province=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*'
# 'addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*'
label: Address
placeholders:
block_number: Block Number
block_number!jp: Block No.
city: City
city!jp: City/Town/Village/Tokyo Special Ward
city!vn: City/Town
conscriptionnumber: '123'
country: Country
county: County
county!jp: District
district: District
district!vn: Arrondissement/Town/District
floor: Floor
hamlet: Hamlet
housename: Housename
housenumber: '123'
housenumber!jp: Building No./Lot No.
neighbourhood: Neighbourhood
neighbourhood!jp: Chōme/Aza/Koaza
place: Place
postcode: Postcode
postcode!us: ZIP Code
province: Province
province!jp: Prefecture
quarter: Quarter
quarter!jp: Ōaza/Machi
state: State
street: Street
subdistrict: Subdistrict
subdistrict!vn: Ward/Commune/Townlet
suburb: Suburb
suburb!jp: Ward
admin_level:
# admin_level=*
label: Admin Level
Expand Down Expand Up @@ -167,6 +183,22 @@ en:
barrier:
# barrier=*
label: Type
bath/open_air:
# 'bath:open_air=*'
label: Open air bath
bath/sand_bath:
# 'bath:sand_bath=*'
label: Sand bath
bath/type:
# 'bath:type=*'
label: Bath amenity
options:
# 'bath:type=foot_bath'
foot_bath: Foot Bath
# 'bath:type=hot_spring'
hot_spring: Hot Spring
# 'bath:type=onsen'
onsen: Onsen
beauty:
# beauty=*
label: Shop Type
Expand Down Expand Up @@ -1640,6 +1672,11 @@ en:
name: Pub
# 'terms: alcohol,drink,dive,beer,bier,booze'
terms: '<translate with synonyms or related terms for ''Pub'', separated by commas>'
amenity/public_bath:
# amenity=public_bath
name: Public bath
# 'terms: onsen,foot bath,hot springs'
terms: '<translate with synonyms or related terms for ''Public bath'', separated by commas>'
amenity/public_bookcase:
# amenity=public_bookcase
name: Public Bookcase
Expand Down
44 changes: 43 additions & 1 deletion data/presets/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,20 @@
"type": "address",
"keys": [
"addr:city",
"addr:block_number",
"addr:conscriptionnumber",
"addr:country",
"addr:county",
"addr:district",
"addr:floor",
"addr:hamlet",
"addr:housename",
"addr:housenumber",
"addr:neighbourhood",
"addr:place",
"addr:postcode",
"addr:province",
"addr:quarter",
"addr:state",
"addr:street",
"addr:subdistrict",
Expand All @@ -104,20 +108,36 @@
"strings": {
"placeholders": {
"city": "City",
"block_number": "Block Number",
"conscriptionnumber": "123",
"country": "Country",
"county": "County",
"district": "District",
"floor": "Floor",
"hamlet": "Hamlet",
"housename": "Housename",
"housenumber": "123",
"neighbourhood": "Neighbourhood",
"place": "Place",
"postcode": "Postcode",
"postcode!us": "ZIP Code",
"province": "Province",
"quarter": "Quarter",
"state": "State",
"street": "Street",
"subdistrict": "Subdistrict",
"suburb": "Suburb"
"suburb": "Suburb",
"subdistrict!vn": "Ward/Commune/Townlet",
"district!vn": "Arrondissement/Town/District",
"city!vn": "City/Town",
"province!jp": "Prefecture",
"county!jp": "District",
"city!jp": "City/Town/Village/Tokyo Special Ward",
"suburb!jp": "Ward",
"quarter!jp": "Ōaza/Machi",
"neighbourhood!jp": "Chōme/Aza/Koaza",
"block_number!jp": "Block No.",
"housenumber!jp": "Building No./Lot No."
}
}
},
Expand Down Expand Up @@ -223,6 +243,28 @@
"type": "typeCombo",
"label": "Type"
},
"bath/open_air": {
"key": "bath:open_air",
"label": "Open air bath",
"type": "check"
},
"bath/sand_bath": {
"key": "bath:sand_bath",
"label": "Sand bath",
"type": "check"
},
"bath/type": {
"key": "bath:type",
"type": "combo",
"label": "Bath amenity",
"strings": {
"options": {
"onsen": "Onsen",
"foot_bath": "Foot Bath",
"hot_spring": "Hot Spring"
}
}
},
"beauty": {
"key": "beauty",
"type": "combo",
Expand Down
22 changes: 21 additions & 1 deletion data/presets/fields/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
"type": "address",
"keys": [
"addr:city",
"addr:block_number",
"addr:conscriptionnumber",
"addr:country",
"addr:county",
"addr:district",
"addr:floor",
"addr:hamlet",
"addr:housename",
"addr:housenumber",
"addr:neighbourhood",
"addr:place",
"addr:postcode",
"addr:province",
"addr:quarter",
"addr:state",
"addr:street",
"addr:subdistrict",
Expand All @@ -24,20 +28,36 @@
"strings": {
"placeholders": {
"city": "City",
"block_number": "Block Number",
"conscriptionnumber": "123",
"country": "Country",
"county": "County",
"district": "District",
"floor": "Floor",
"hamlet": "Hamlet",
"housename": "Housename",
"housenumber": "123",
"neighbourhood": "Neighbourhood",
"place": "Place",
"postcode": "Postcode",
"postcode!us": "ZIP Code",
"province": "Province",
"quarter": "Quarter",
"state": "State",
"street": "Street",
"subdistrict": "Subdistrict",
"suburb": "Suburb"
"suburb": "Suburb",
"subdistrict!vn": "Ward/Commune/Townlet",
"district!vn": "Arrondissement/Town/District",
"city!vn": "City/Town",
"province!jp": "Prefecture",
"county!jp": "District",
"city!jp": "City/Town/Village/Tokyo Special Ward",
"suburb!jp": "Ward",
"quarter!jp": "Ōaza/Machi",
"neighbourhood!jp": "Chōme/Aza/Koaza",
"block_number!jp": "Block No.",
"housenumber!jp": "Building No./Lot No."
}
}
}
5 changes: 5 additions & 0 deletions data/presets/fields/bath/open_air.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key": "bath:open_air",
"label": "Open air bath",
"type": "check"
}
5 changes: 5 additions & 0 deletions data/presets/fields/bath/sand_bath.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key": "bath:sand_bath",
"label": "Sand bath",
"type": "check"
}
12 changes: 12 additions & 0 deletions data/presets/fields/bath/type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "bath:type",
"type": "combo",
"label": "Bath amenity",
"strings": {
"options": {
"onsen": "Onsen",
"foot_bath": "Foot Bath",
"hot_spring": "Hot Spring"
}
}
}
24 changes: 24 additions & 0 deletions data/presets/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -1872,6 +1872,30 @@
],
"name": "Pub"
},
"amenity/public_bath": {
"icon": "water",
"fields": [
"bath/type",
"bath/open_air",
"bath/sand_bath",
"address",
"building_area",
"opening_hours"
],
"geometry": [
"point",
"area"
],
"tags": {
"amenity": "public_bath"
},
"terms": [
"onsen",
"foot bath",
"hot springs"
],
"name": "Public bath"
},
"amenity/public_bookcase": {
"icon": "library",
"fields": [
Expand Down
24 changes: 24 additions & 0 deletions data/presets/presets/amenity/public_bath.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"icon": "water",
"fields": [
"bath/type",
"bath/open_air",
"bath/sand_bath",
"address",
"building_area",
"opening_hours"
],
"geometry": [
"point",
"area"
],
"tags": {
"amenity": "public_bath"
},
"terms": [
"onsen",
"foot bath",
"hot springs"
],
"name": "Public bath"
}
4 changes: 4 additions & 0 deletions data/taginfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@
"key": "amenity",
"value": "pub"
},
{
"key": "amenity",
"value": "public_bath"
},
{
"key": "amenity",
"value": "public_bookcase"
Expand Down
Loading