mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
sync dropdown keys with address tags from id-tagging-schema
This commit is contained in:
@@ -134,10 +134,6 @@
|
||||
["quarter", "neighbourhood"],
|
||||
["block_number", "housenumber"]
|
||||
],
|
||||
"dropdowns": [
|
||||
"postcode", "province", "county", "city", "suburb",
|
||||
"quarter", "neighbourhood", "block_number"
|
||||
],
|
||||
"widths": {
|
||||
"postcode": 0.3,
|
||||
"province": 0.35,
|
||||
@@ -212,9 +208,6 @@
|
||||
["neighbourhood"],
|
||||
["city", "state", "postcode"]
|
||||
],
|
||||
"dropdowns": [
|
||||
"street", "neighbourhood", "city", "state", "postcode"
|
||||
],
|
||||
"widths": {
|
||||
"street": 0.7,
|
||||
"housenumber": 0.3,
|
||||
@@ -238,9 +231,6 @@
|
||||
["housename", "subdistrict"],
|
||||
["district", "city", "postcode"]
|
||||
],
|
||||
"dropdowns": [
|
||||
"street", "city", "subdistrict", "district", "postcode"
|
||||
],
|
||||
"widths": {
|
||||
"street": 0.7,
|
||||
"housenumber": 0.3,
|
||||
|
||||
@@ -146,11 +146,26 @@ export function uiFieldAddress(field, context) {
|
||||
}
|
||||
}
|
||||
|
||||
var dropdowns = addressFormat.dropdowns || [
|
||||
'city', 'county', 'country', 'district', 'hamlet',
|
||||
'neighbourhood', 'place', 'postcode', 'province',
|
||||
'quarter', 'state', 'street', 'street+place', 'subdistrict', 'suburb'
|
||||
];
|
||||
const dropdowns = new Set([
|
||||
'block_number',
|
||||
'city',
|
||||
'country',
|
||||
'county',
|
||||
'district',
|
||||
'floor',
|
||||
'hamlet',
|
||||
'neighbourhood',
|
||||
'place',
|
||||
'postcode',
|
||||
'province',
|
||||
'quarter',
|
||||
'state',
|
||||
'street',
|
||||
'street+place',
|
||||
'subdistrict',
|
||||
'suburb',
|
||||
'town'
|
||||
]);
|
||||
|
||||
var widths = addressFormat.widths || {
|
||||
housenumber: 1/5, unit: 1/5, street: 1/2, place: 1/2,
|
||||
@@ -196,7 +211,7 @@ export function uiFieldAddress(field, context) {
|
||||
|
||||
|
||||
function addDropdown(d) {
|
||||
if (dropdowns.indexOf(d.id) === -1) return; // not a dropdown
|
||||
if (!dropdowns.has(d.id)) return; // not a dropdown
|
||||
|
||||
var nearValues;
|
||||
switch (d.id) {
|
||||
|
||||
Reference in New Issue
Block a user