mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Degunk data sources by named-importing single toplevel key
See: https://github.com/openstreetmap/iD/issues/3403#issuecomment-245150454 This change drops the iD.js bundle size from 4.5MB to 3.4MB, and makes it much more readable, which is nice for debugging. This does not affect the minified bundle size.
This commit is contained in:
@@ -38,16 +38,16 @@ validateCategoryPresets(categories, presets);
|
||||
validatePresetFields(presets, fields);
|
||||
|
||||
// Save individual data files
|
||||
fs.writeFileSync('data/presets/categories.json', JSON.stringify(categories, null, 4));
|
||||
fs.writeFileSync('data/presets/fields.json', JSON.stringify(fields, null, 4));
|
||||
fs.writeFileSync('data/presets/presets.json', JSON.stringify(presets, null, 4));
|
||||
fs.writeFileSync('data/presets/categories.json', JSON.stringify({ categories: categories }, null, 4));
|
||||
fs.writeFileSync('data/presets/fields.json', JSON.stringify({ fields: fields }, null, 4));
|
||||
fs.writeFileSync('data/presets/presets.json', JSON.stringify({ presets: presets }, null, 4));
|
||||
fs.writeFileSync('data/presets.yaml', translationsToYAML(translations));
|
||||
fs.writeFileSync('data/taginfo.json', JSON.stringify(taginfo, null, 4));
|
||||
|
||||
// Push changes from data/core.yaml into en.json
|
||||
var core = YAML.load(fs.readFileSync('data/core.yaml', 'utf8'));
|
||||
var en = _.merge(core, { en: { presets: tstrings }});
|
||||
fs.writeFileSync('dist/locales/en.json', JSON.stringify(en.en, null, 4));
|
||||
fs.writeFileSync('dist/locales/en.json', JSON.stringify(en, null, 4));
|
||||
|
||||
process.exit();
|
||||
|
||||
|
||||
+43
-41
@@ -1,41 +1,43 @@
|
||||
[
|
||||
{
|
||||
"format": [["housenumber", "street"], ["city", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["gb"],
|
||||
"format": [["housename"], ["housenumber", "street"], ["city", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ie"],
|
||||
"format": [["housename"], ["housenumber", "street"], ["city"], ["postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ad", "at", "ba", "be", "ch", "cz", "de", "dk", "es", "fi", "gr", "hr", "is", "it", "li", "nl", "no", "pl", "pt", "se", "si", "sk", "sm", "va"],
|
||||
"format": [["street", "housenumber"], ["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": ["us"],
|
||||
"format": [["housenumber", "street"], ["city", "state", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ca"],
|
||||
"format": [["housenumber", "street"], ["city", "province", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["tw"],
|
||||
"format": [["postcode", "city", "district"], ["place", "street"], ["housenumber", "floor"]]
|
||||
}
|
||||
]
|
||||
{
|
||||
"dataAddressFormats": [
|
||||
{
|
||||
"format": [["housenumber", "street"], ["city", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["gb"],
|
||||
"format": [["housename"], ["housenumber", "street"], ["city", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ie"],
|
||||
"format": [["housename"], ["housenumber", "street"], ["city"], ["postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ad", "at", "ba", "be", "ch", "cz", "de", "dk", "es", "fi", "gr", "hr", "is", "it", "li", "nl", "no", "pl", "pt", "se", "si", "sk", "sm", "va"],
|
||||
"format": [["street", "housenumber"], ["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": ["us"],
|
||||
"format": [["housenumber", "street"], ["city", "state", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["ca"],
|
||||
"format": [["housenumber", "street"], ["city", "province", "postcode"]]
|
||||
},
|
||||
{
|
||||
"countryCodes": ["tw"],
|
||||
"format": [["postcode", "city", "district"], ["place", "street"], ["housenumber", "floor"]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+89
-87
@@ -1,88 +1,90 @@
|
||||
[
|
||||
{
|
||||
"old": { "amenity": "firepit" },
|
||||
"replace": {
|
||||
"leisure": "firepit"
|
||||
{
|
||||
"dataDeprecated": [
|
||||
{
|
||||
"old": { "amenity": "firepit" },
|
||||
"replace": {
|
||||
"leisure": "firepit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "barrier": "wire_fence" },
|
||||
"replace": {
|
||||
"barrier": "fence",
|
||||
"fence_type": "chain"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "barrier": "wood_fence" },
|
||||
"replace": {
|
||||
"barrier": "fence",
|
||||
"fence_type": "wood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "ford" },
|
||||
"replace": {
|
||||
"ford": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "stile" },
|
||||
"replace": {
|
||||
"barrier": "stile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "incline" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "incline_steep" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "unsurfaced" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "unpaved"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "landuse": "wood" },
|
||||
"replace": {
|
||||
"landuse": "forest",
|
||||
"natural": "wood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "natural": "marsh" },
|
||||
"replace": {
|
||||
"natural": "wetland",
|
||||
"wetland": "marsh"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "power_source": "*" },
|
||||
"replace": {
|
||||
"generator:source": "$1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "power_rating": "*" },
|
||||
"replace": {
|
||||
"generator:output": "$1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "shop": "organic" },
|
||||
"replace": {
|
||||
"shop": "supermarket",
|
||||
"organic": "only"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "barrier": "wire_fence" },
|
||||
"replace": {
|
||||
"barrier": "fence",
|
||||
"fence_type": "chain"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "barrier": "wood_fence" },
|
||||
"replace": {
|
||||
"barrier": "fence",
|
||||
"fence_type": "wood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "ford" },
|
||||
"replace": {
|
||||
"ford": "yes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "stile" },
|
||||
"replace": {
|
||||
"barrier": "stile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "incline" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "incline_steep" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "up"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "highway": "unsurfaced" },
|
||||
"replace": {
|
||||
"highway": "road",
|
||||
"incline": "unpaved"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "landuse": "wood" },
|
||||
"replace": {
|
||||
"landuse": "forest",
|
||||
"natural": "wood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "natural": "marsh" },
|
||||
"replace": {
|
||||
"natural": "wetland",
|
||||
"wetland": "marsh"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "power_source": "*" },
|
||||
"replace": {
|
||||
"generator:source": "$1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "power_rating": "*" },
|
||||
"replace": {
|
||||
"generator:output": "$1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"old": { "shop": "organic" },
|
||||
"replace": {
|
||||
"shop": "supermarket",
|
||||
"organic": "only"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
+46
-44
@@ -1,48 +1,50 @@
|
||||
[
|
||||
"created_by",
|
||||
"odbl",
|
||||
"odbl:note",
|
||||
{
|
||||
"dataDiscarded": [
|
||||
"created_by",
|
||||
"odbl",
|
||||
"odbl:note",
|
||||
|
||||
"tiger:upload_uuid",
|
||||
"tiger:tlid",
|
||||
"tiger:source",
|
||||
"tiger:separated",
|
||||
"tiger:upload_uuid",
|
||||
"tiger:tlid",
|
||||
"tiger:source",
|
||||
"tiger:separated",
|
||||
|
||||
"geobase:datasetName",
|
||||
"geobase:uuid",
|
||||
"sub_sea:type",
|
||||
"geobase:datasetName",
|
||||
"geobase:uuid",
|
||||
"sub_sea:type",
|
||||
|
||||
"KSJ2:ADS",
|
||||
"KSJ2:ARE",
|
||||
"KSJ2:AdminArea",
|
||||
"KSJ2:COP_label",
|
||||
"KSJ2:DFD",
|
||||
"KSJ2:INT",
|
||||
"KSJ2:INT_label",
|
||||
"KSJ2:LOC",
|
||||
"KSJ2:LPN",
|
||||
"KSJ2:OPC",
|
||||
"KSJ2:PubFacAdmin",
|
||||
"KSJ2:RAC",
|
||||
"KSJ2:RAC_label",
|
||||
"KSJ2:RIC",
|
||||
"KSJ2:RIN",
|
||||
"KSJ2:WSC",
|
||||
"KSJ2:coordinate",
|
||||
"KSJ2:curve_id",
|
||||
"KSJ2:curve_type",
|
||||
"KSJ2:filename",
|
||||
"KSJ2:lake_id",
|
||||
"KSJ2:lat",
|
||||
"KSJ2:long",
|
||||
"KSJ2:river_id",
|
||||
"yh:LINE_NAME",
|
||||
"yh:LINE_NUM",
|
||||
"yh:STRUCTURE",
|
||||
"yh:TOTYUMONO",
|
||||
"yh:TYPE",
|
||||
"yh:WIDTH",
|
||||
"yh:WIDTH_RANK",
|
||||
"KSJ2:ADS",
|
||||
"KSJ2:ARE",
|
||||
"KSJ2:AdminArea",
|
||||
"KSJ2:COP_label",
|
||||
"KSJ2:DFD",
|
||||
"KSJ2:INT",
|
||||
"KSJ2:INT_label",
|
||||
"KSJ2:LOC",
|
||||
"KSJ2:LPN",
|
||||
"KSJ2:OPC",
|
||||
"KSJ2:PubFacAdmin",
|
||||
"KSJ2:RAC",
|
||||
"KSJ2:RAC_label",
|
||||
"KSJ2:RIC",
|
||||
"KSJ2:RIN",
|
||||
"KSJ2:WSC",
|
||||
"KSJ2:coordinate",
|
||||
"KSJ2:curve_id",
|
||||
"KSJ2:curve_type",
|
||||
"KSJ2:filename",
|
||||
"KSJ2:lake_id",
|
||||
"KSJ2:lat",
|
||||
"KSJ2:long",
|
||||
"KSJ2:river_id",
|
||||
"yh:LINE_NAME",
|
||||
"yh:LINE_NUM",
|
||||
"yh:STRUCTURE",
|
||||
"yh:TOTYUMONO",
|
||||
"yh:TYPE",
|
||||
"yh:WIDTH",
|
||||
"yh:WIDTH_RANK",
|
||||
|
||||
"SK53_bulk:load"
|
||||
]
|
||||
"SK53_bulk:load"
|
||||
]
|
||||
}
|
||||
|
||||
+51836
-51834
File diff suppressed because it is too large
Load Diff
+14
-13
@@ -2,20 +2,21 @@ export { wikipedia as dataWikipedia } from 'wmf-sitematrix';
|
||||
export { default as dataFeatureIcons } from 'maki/www/maki-sprite.json';
|
||||
export { default as dataSuggestions } from 'name-suggestion-index/name-suggestions.json';
|
||||
|
||||
export { default as dataDeprecated } from './deprecated.json';
|
||||
export { default as dataDiscarded } from './discarded.json';
|
||||
export { default as dataImperial } from './imperial.json';
|
||||
export { default as dataLocales } from './locales.json';
|
||||
export { default as dataAddressFormats } from './address-formats.json';
|
||||
export { default as dataPhoneFormats } from './phone-formats.json';
|
||||
export { default as dataDriveLeft } from './drive-left.json';
|
||||
export { default as dataImagery } from './imagery.json';
|
||||
export { default as dataEn } from '../dist/locales/en.json';
|
||||
export { dataAddressFormats } from './address-formats.json';
|
||||
export { dataDeprecated } from './deprecated.json';
|
||||
export { dataDiscarded } from './discarded.json';
|
||||
export { dataImagery } from './imagery.json';
|
||||
export { dataLocales } from './locales.json';
|
||||
export { dataPhoneFormats } from './phone-formats.json';
|
||||
|
||||
import { default as presets } from './presets/presets.json';
|
||||
import { default as defaults } from './presets/defaults.json';
|
||||
import { default as categories } from './presets/categories.json';
|
||||
import { default as fields } from './presets/fields.json';
|
||||
export { default as dataImperial } from './imperial.json';
|
||||
export { default as dataDriveLeft } from './drive-left.json';
|
||||
export { en as dataEn } from '../dist/locales/en.json';
|
||||
|
||||
import { presets } from './presets/presets.json';
|
||||
import { defaults } from './presets/defaults.json';
|
||||
import { categories } from './presets/categories.json';
|
||||
import { fields } from './presets/fields.json';
|
||||
|
||||
export var dataPresets = {
|
||||
presets: presets,
|
||||
|
||||
File diff suppressed because one or more lines are too long
+65
-63
@@ -1,63 +1,65 @@
|
||||
[
|
||||
"af",
|
||||
"sq",
|
||||
"ar",
|
||||
"ar-AA",
|
||||
"hy",
|
||||
"ast",
|
||||
"bn",
|
||||
"bs",
|
||||
"bg-BG",
|
||||
"ca",
|
||||
"zh",
|
||||
"zh-CN",
|
||||
"zh-HK",
|
||||
"zh-TW",
|
||||
"yue",
|
||||
"hr",
|
||||
"cs",
|
||||
"da",
|
||||
"nl",
|
||||
"en-GB",
|
||||
"eo",
|
||||
"et",
|
||||
"fi",
|
||||
"fr",
|
||||
"gl",
|
||||
"de",
|
||||
"el",
|
||||
"gu",
|
||||
"hi",
|
||||
"hu",
|
||||
"is",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"kn",
|
||||
"ko",
|
||||
"lv",
|
||||
"lij",
|
||||
"lt",
|
||||
"ml",
|
||||
"no",
|
||||
"fa",
|
||||
"pl",
|
||||
"pt",
|
||||
"pt-BR",
|
||||
"ro",
|
||||
"ru",
|
||||
"sc",
|
||||
"sr",
|
||||
"si",
|
||||
"sk",
|
||||
"sl",
|
||||
"es",
|
||||
"sv",
|
||||
"tl",
|
||||
"ta",
|
||||
"te",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi"
|
||||
]
|
||||
{
|
||||
"dataLocales": [
|
||||
"af",
|
||||
"sq",
|
||||
"ar",
|
||||
"ar-AA",
|
||||
"hy",
|
||||
"ast",
|
||||
"bn",
|
||||
"bs",
|
||||
"bg-BG",
|
||||
"ca",
|
||||
"zh",
|
||||
"zh-CN",
|
||||
"zh-HK",
|
||||
"zh-TW",
|
||||
"yue",
|
||||
"hr",
|
||||
"cs",
|
||||
"da",
|
||||
"nl",
|
||||
"en-GB",
|
||||
"eo",
|
||||
"et",
|
||||
"fi",
|
||||
"fr",
|
||||
"gl",
|
||||
"de",
|
||||
"el",
|
||||
"gu",
|
||||
"hi",
|
||||
"hu",
|
||||
"is",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"kn",
|
||||
"ko",
|
||||
"lv",
|
||||
"lij",
|
||||
"lt",
|
||||
"ml",
|
||||
"no",
|
||||
"fa",
|
||||
"pl",
|
||||
"pt",
|
||||
"pt-BR",
|
||||
"ro",
|
||||
"ru",
|
||||
"sc",
|
||||
"sr",
|
||||
"si",
|
||||
"sk",
|
||||
"sl",
|
||||
"es",
|
||||
"sv",
|
||||
"tl",
|
||||
"ta",
|
||||
"te",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi"
|
||||
]
|
||||
}
|
||||
+52
-50
@@ -1,52 +1,54 @@
|
||||
{
|
||||
"us": "+1-202-555-1234",
|
||||
"ca": "+1-226-555-1234",
|
||||
"bs": "+1-242-555-1234",
|
||||
"bb": "+1-246-555-1234",
|
||||
"ai": "+1-264-555-1234",
|
||||
"ag": "+1-268-555-1234",
|
||||
"vg": "+1-284-555-1234",
|
||||
"vi": "+1-340-555-1234",
|
||||
"ky": "+1-345-555-1234",
|
||||
"bm": "+1-441-555-1234",
|
||||
"gd": "+1-473-555-1234",
|
||||
"tc": "+1-649-555-1234",
|
||||
"ms": "+1-664-555-1234",
|
||||
"mp": "+1-670-555-1234",
|
||||
"gu": "+1-671-555-1234",
|
||||
"as": "+1-684-555-1234",
|
||||
"sx": "+1-721-555-1234",
|
||||
"lc": "+1-758-555-1234",
|
||||
"dm": "+1-767-555-1234",
|
||||
"vc": "+1-784-555-1234",
|
||||
"pr": "+1-787-555-1234",
|
||||
"do": "+1-809-555-1234",
|
||||
"tt": "+1-868-555-1234",
|
||||
"kn": "+1-869-555-1234",
|
||||
"jm": "+1-876-555-1234",
|
||||
"za": "+27 11 907 1111",
|
||||
"nl": "+31 42 123 4567",
|
||||
"fr": "+33 1 23 45 67 89",
|
||||
"es": "+34 989 12 34 56",
|
||||
"pt": "+351 211 123456",
|
||||
"fi": "+358 40 123 4567",
|
||||
"hu": "+36 1 123 45 67",
|
||||
"hr": "+385 01 123 4567",
|
||||
"si": "+386 31 123 4567",
|
||||
"it": "+39 01 123 456",
|
||||
"va": "+39 01 123 456",
|
||||
"gb": "+44 207 123456",
|
||||
"gg": "+44 207 123456",
|
||||
"im": "+44 207 123456",
|
||||
"je": "+44 207 123456",
|
||||
"se": "+46 31 123 4567",
|
||||
"no": "+47 22 12 34 56",
|
||||
"sj": "+47 22 12 34 56",
|
||||
"pl": "+48 42 123 4567",
|
||||
"de": "+49 89 1234567",
|
||||
"br": "+55 11 0982 1098",
|
||||
"ru": "+7 495 1234567",
|
||||
"kz": "+7 495 1234567",
|
||||
"vn": "+84 1 234 5678",
|
||||
"hk": "+852 12345678"
|
||||
"dataPhoneFormats": {
|
||||
"us": "+1-202-555-1234",
|
||||
"ca": "+1-226-555-1234",
|
||||
"bs": "+1-242-555-1234",
|
||||
"bb": "+1-246-555-1234",
|
||||
"ai": "+1-264-555-1234",
|
||||
"ag": "+1-268-555-1234",
|
||||
"vg": "+1-284-555-1234",
|
||||
"vi": "+1-340-555-1234",
|
||||
"ky": "+1-345-555-1234",
|
||||
"bm": "+1-441-555-1234",
|
||||
"gd": "+1-473-555-1234",
|
||||
"tc": "+1-649-555-1234",
|
||||
"ms": "+1-664-555-1234",
|
||||
"mp": "+1-670-555-1234",
|
||||
"gu": "+1-671-555-1234",
|
||||
"as": "+1-684-555-1234",
|
||||
"sx": "+1-721-555-1234",
|
||||
"lc": "+1-758-555-1234",
|
||||
"dm": "+1-767-555-1234",
|
||||
"vc": "+1-784-555-1234",
|
||||
"pr": "+1-787-555-1234",
|
||||
"do": "+1-809-555-1234",
|
||||
"tt": "+1-868-555-1234",
|
||||
"kn": "+1-869-555-1234",
|
||||
"jm": "+1-876-555-1234",
|
||||
"za": "+27 11 907 1111",
|
||||
"nl": "+31 42 123 4567",
|
||||
"fr": "+33 1 23 45 67 89",
|
||||
"es": "+34 989 12 34 56",
|
||||
"pt": "+351 211 123456",
|
||||
"fi": "+358 40 123 4567",
|
||||
"hu": "+36 1 123 45 67",
|
||||
"hr": "+385 01 123 4567",
|
||||
"si": "+386 31 123 4567",
|
||||
"it": "+39 01 123 456",
|
||||
"va": "+39 01 123 456",
|
||||
"gb": "+44 207 123456",
|
||||
"gg": "+44 207 123456",
|
||||
"im": "+44 207 123456",
|
||||
"je": "+44 207 123456",
|
||||
"se": "+46 31 123 4567",
|
||||
"no": "+47 22 12 34 56",
|
||||
"sj": "+47 22 12 34 56",
|
||||
"pl": "+48 42 123 4567",
|
||||
"de": "+49 89 1234567",
|
||||
"br": "+55 11 0982 1098",
|
||||
"ru": "+7 495 1234567",
|
||||
"kz": "+7 495 1234567",
|
||||
"vn": "+84 1 234 5678",
|
||||
"hk": "+852 12345678"
|
||||
}
|
||||
}
|
||||
|
||||
+166
-164
@@ -1,167 +1,169 @@
|
||||
{
|
||||
"category-barrier": {
|
||||
"geometry": "line",
|
||||
"name": "Barrier Features",
|
||||
"icon": "roadblock",
|
||||
"members": [
|
||||
"barrier/fence",
|
||||
"barrier/wall",
|
||||
"barrier/ditch",
|
||||
"barrier/gate",
|
||||
"barrier"
|
||||
]
|
||||
},
|
||||
"category-building": {
|
||||
"geometry": "area",
|
||||
"name": "Building Features",
|
||||
"icon": "building",
|
||||
"members": [
|
||||
"building",
|
||||
"building/house",
|
||||
"building/apartments",
|
||||
"building/commercial",
|
||||
"building/industrial",
|
||||
"building/residential"
|
||||
]
|
||||
},
|
||||
"category-golf": {
|
||||
"geometry": "area",
|
||||
"name": "Golf Features",
|
||||
"icon": "golf",
|
||||
"members": [
|
||||
"golf/fairway",
|
||||
"golf/green",
|
||||
"golf/lateral_water_hazard_area",
|
||||
"golf/rough",
|
||||
"golf/bunker",
|
||||
"golf/tee",
|
||||
"golf/water_hazard_area"
|
||||
]
|
||||
},
|
||||
"category-landuse": {
|
||||
"geometry": "area",
|
||||
"name": "Land Use Features",
|
||||
"icon": "land-use",
|
||||
"members": [
|
||||
"landuse/residential",
|
||||
"landuse/industrial",
|
||||
"landuse/commercial",
|
||||
"landuse/retail",
|
||||
"landuse/farmland",
|
||||
"landuse/farmyard",
|
||||
"landuse/forest",
|
||||
"landuse/meadow",
|
||||
"landuse/cemetery",
|
||||
"landuse/military"
|
||||
]
|
||||
},
|
||||
"category-path": {
|
||||
"geometry": "line",
|
||||
"name": "Path Features",
|
||||
"icon": "category-path",
|
||||
"members": [
|
||||
"highway/pedestrian",
|
||||
"footway/crosswalk",
|
||||
"footway/sidewalk",
|
||||
"highway/footway",
|
||||
"highway/cycleway",
|
||||
"highway/bridleway",
|
||||
"highway/path",
|
||||
"highway/steps"
|
||||
]
|
||||
},
|
||||
"category-rail": {
|
||||
"geometry": "line",
|
||||
"name": "Rail Features",
|
||||
"icon": "category-rail",
|
||||
"members": [
|
||||
"railway/rail",
|
||||
"railway/subway",
|
||||
"railway/tram",
|
||||
"railway/monorail",
|
||||
"railway/disused",
|
||||
"railway/abandoned"
|
||||
]
|
||||
},
|
||||
"category-restriction": {
|
||||
"geometry": "relation",
|
||||
"name": "Restriction Features",
|
||||
"icon": "restriction",
|
||||
"members": [
|
||||
"type/restriction/no_left_turn",
|
||||
"type/restriction/no_right_turn",
|
||||
"type/restriction/no_straight_on",
|
||||
"type/restriction/no_u_turn",
|
||||
"type/restriction/only_left_turn",
|
||||
"type/restriction/only_right_turn",
|
||||
"type/restriction/only_straight_on",
|
||||
"type/restriction"
|
||||
]
|
||||
},
|
||||
"category-road": {
|
||||
"geometry": "line",
|
||||
"name": "Road Features",
|
||||
"icon": "category-roads",
|
||||
"members": [
|
||||
"highway/residential",
|
||||
"highway/motorway",
|
||||
"highway/trunk",
|
||||
"highway/primary",
|
||||
"highway/secondary",
|
||||
"highway/tertiary",
|
||||
"highway/service",
|
||||
"highway/motorway_link",
|
||||
"highway/trunk_link",
|
||||
"highway/primary_link",
|
||||
"highway/secondary_link",
|
||||
"highway/tertiary_link",
|
||||
"highway/unclassified",
|
||||
"highway/track",
|
||||
"highway/road"
|
||||
]
|
||||
},
|
||||
"category-route": {
|
||||
"geometry": "relation",
|
||||
"name": "Route Features",
|
||||
"icon": "route",
|
||||
"members": [
|
||||
"type/route/road",
|
||||
"type/route/bicycle",
|
||||
"type/route/foot",
|
||||
"type/route/hiking",
|
||||
"type/route/horse",
|
||||
"type/route/bus",
|
||||
"type/route/train",
|
||||
"type/route/tram",
|
||||
"type/route/ferry",
|
||||
"type/route/power",
|
||||
"type/route/pipeline",
|
||||
"type/route/detour",
|
||||
"type/route_master",
|
||||
"type/route"
|
||||
]
|
||||
},
|
||||
"category-water-area": {
|
||||
"geometry": "area",
|
||||
"name": "Water Features",
|
||||
"icon": "water",
|
||||
"members": [
|
||||
"natural/water/lake",
|
||||
"natural/water/pond",
|
||||
"natural/water/reservoir",
|
||||
"natural/water"
|
||||
]
|
||||
},
|
||||
"category-water-line": {
|
||||
"geometry": "line",
|
||||
"name": "Water Features",
|
||||
"icon": "category-water",
|
||||
"members": [
|
||||
"waterway/river",
|
||||
"waterway/stream",
|
||||
"waterway/canal",
|
||||
"waterway/ditch",
|
||||
"waterway/drain"
|
||||
]
|
||||
"categories": {
|
||||
"category-barrier": {
|
||||
"geometry": "line",
|
||||
"name": "Barrier Features",
|
||||
"icon": "roadblock",
|
||||
"members": [
|
||||
"barrier/fence",
|
||||
"barrier/wall",
|
||||
"barrier/ditch",
|
||||
"barrier/gate",
|
||||
"barrier"
|
||||
]
|
||||
},
|
||||
"category-building": {
|
||||
"geometry": "area",
|
||||
"name": "Building Features",
|
||||
"icon": "building",
|
||||
"members": [
|
||||
"building",
|
||||
"building/house",
|
||||
"building/apartments",
|
||||
"building/commercial",
|
||||
"building/industrial",
|
||||
"building/residential"
|
||||
]
|
||||
},
|
||||
"category-golf": {
|
||||
"geometry": "area",
|
||||
"name": "Golf Features",
|
||||
"icon": "golf",
|
||||
"members": [
|
||||
"golf/fairway",
|
||||
"golf/green",
|
||||
"golf/lateral_water_hazard_area",
|
||||
"golf/rough",
|
||||
"golf/bunker",
|
||||
"golf/tee",
|
||||
"golf/water_hazard_area"
|
||||
]
|
||||
},
|
||||
"category-landuse": {
|
||||
"geometry": "area",
|
||||
"name": "Land Use Features",
|
||||
"icon": "land-use",
|
||||
"members": [
|
||||
"landuse/residential",
|
||||
"landuse/industrial",
|
||||
"landuse/commercial",
|
||||
"landuse/retail",
|
||||
"landuse/farmland",
|
||||
"landuse/farmyard",
|
||||
"landuse/forest",
|
||||
"landuse/meadow",
|
||||
"landuse/cemetery",
|
||||
"landuse/military"
|
||||
]
|
||||
},
|
||||
"category-path": {
|
||||
"geometry": "line",
|
||||
"name": "Path Features",
|
||||
"icon": "category-path",
|
||||
"members": [
|
||||
"highway/pedestrian",
|
||||
"footway/crosswalk",
|
||||
"footway/sidewalk",
|
||||
"highway/footway",
|
||||
"highway/cycleway",
|
||||
"highway/bridleway",
|
||||
"highway/path",
|
||||
"highway/steps"
|
||||
]
|
||||
},
|
||||
"category-rail": {
|
||||
"geometry": "line",
|
||||
"name": "Rail Features",
|
||||
"icon": "category-rail",
|
||||
"members": [
|
||||
"railway/rail",
|
||||
"railway/subway",
|
||||
"railway/tram",
|
||||
"railway/monorail",
|
||||
"railway/disused",
|
||||
"railway/abandoned"
|
||||
]
|
||||
},
|
||||
"category-restriction": {
|
||||
"geometry": "relation",
|
||||
"name": "Restriction Features",
|
||||
"icon": "restriction",
|
||||
"members": [
|
||||
"type/restriction/no_left_turn",
|
||||
"type/restriction/no_right_turn",
|
||||
"type/restriction/no_straight_on",
|
||||
"type/restriction/no_u_turn",
|
||||
"type/restriction/only_left_turn",
|
||||
"type/restriction/only_right_turn",
|
||||
"type/restriction/only_straight_on",
|
||||
"type/restriction"
|
||||
]
|
||||
},
|
||||
"category-road": {
|
||||
"geometry": "line",
|
||||
"name": "Road Features",
|
||||
"icon": "category-roads",
|
||||
"members": [
|
||||
"highway/residential",
|
||||
"highway/motorway",
|
||||
"highway/trunk",
|
||||
"highway/primary",
|
||||
"highway/secondary",
|
||||
"highway/tertiary",
|
||||
"highway/service",
|
||||
"highway/motorway_link",
|
||||
"highway/trunk_link",
|
||||
"highway/primary_link",
|
||||
"highway/secondary_link",
|
||||
"highway/tertiary_link",
|
||||
"highway/unclassified",
|
||||
"highway/track",
|
||||
"highway/road"
|
||||
]
|
||||
},
|
||||
"category-route": {
|
||||
"geometry": "relation",
|
||||
"name": "Route Features",
|
||||
"icon": "route",
|
||||
"members": [
|
||||
"type/route/road",
|
||||
"type/route/bicycle",
|
||||
"type/route/foot",
|
||||
"type/route/hiking",
|
||||
"type/route/horse",
|
||||
"type/route/bus",
|
||||
"type/route/train",
|
||||
"type/route/tram",
|
||||
"type/route/ferry",
|
||||
"type/route/power",
|
||||
"type/route/pipeline",
|
||||
"type/route/detour",
|
||||
"type/route_master",
|
||||
"type/route"
|
||||
]
|
||||
},
|
||||
"category-water-area": {
|
||||
"geometry": "area",
|
||||
"name": "Water Features",
|
||||
"icon": "water",
|
||||
"members": [
|
||||
"natural/water/lake",
|
||||
"natural/water/pond",
|
||||
"natural/water/reservoir",
|
||||
"natural/water"
|
||||
]
|
||||
},
|
||||
"category-water-line": {
|
||||
"geometry": "line",
|
||||
"name": "Water Features",
|
||||
"icon": "category-water",
|
||||
"members": [
|
||||
"waterway/river",
|
||||
"waterway/stream",
|
||||
"waterway/canal",
|
||||
"waterway/ditch",
|
||||
"waterway/drain"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
-50
@@ -1,52 +1,54 @@
|
||||
{
|
||||
"area": [
|
||||
"category-landuse",
|
||||
"category-building",
|
||||
"category-water-area",
|
||||
"leisure/park",
|
||||
"amenity/hospital",
|
||||
"amenity/place_of_worship",
|
||||
"amenity/cafe",
|
||||
"amenity/restaurant",
|
||||
"area"
|
||||
],
|
||||
"line": [
|
||||
"category-road",
|
||||
"category-rail",
|
||||
"category-path",
|
||||
"category-water-line",
|
||||
"category-barrier",
|
||||
"power/line",
|
||||
"line"
|
||||
],
|
||||
"point": [
|
||||
"leisure/park",
|
||||
"amenity/hospital",
|
||||
"amenity/place_of_worship",
|
||||
"amenity/cafe",
|
||||
"amenity/restaurant",
|
||||
"amenity/fast_food",
|
||||
"amenity/bar",
|
||||
"amenity/bank",
|
||||
"shop/supermarket",
|
||||
"point"
|
||||
],
|
||||
"vertex": [
|
||||
"highway/crosswalk",
|
||||
"highway/crossing",
|
||||
"railway/level_crossing",
|
||||
"highway/traffic_signals",
|
||||
"highway/turning_circle",
|
||||
"highway/mini_roundabout",
|
||||
"highway/motorway_junction",
|
||||
"vertex"
|
||||
],
|
||||
"relation": [
|
||||
"category-route",
|
||||
"category-restriction",
|
||||
"type/boundary",
|
||||
"type/multipolygon",
|
||||
"type/site",
|
||||
"relation"
|
||||
]
|
||||
"defaults": {
|
||||
"area": [
|
||||
"category-landuse",
|
||||
"category-building",
|
||||
"category-water-area",
|
||||
"leisure/park",
|
||||
"amenity/hospital",
|
||||
"amenity/place_of_worship",
|
||||
"amenity/cafe",
|
||||
"amenity/restaurant",
|
||||
"area"
|
||||
],
|
||||
"line": [
|
||||
"category-road",
|
||||
"category-rail",
|
||||
"category-path",
|
||||
"category-water-line",
|
||||
"category-barrier",
|
||||
"power/line",
|
||||
"line"
|
||||
],
|
||||
"point": [
|
||||
"leisure/park",
|
||||
"amenity/hospital",
|
||||
"amenity/place_of_worship",
|
||||
"amenity/cafe",
|
||||
"amenity/restaurant",
|
||||
"amenity/fast_food",
|
||||
"amenity/bar",
|
||||
"amenity/bank",
|
||||
"shop/supermarket",
|
||||
"point"
|
||||
],
|
||||
"vertex": [
|
||||
"highway/crosswalk",
|
||||
"highway/crossing",
|
||||
"railway/level_crossing",
|
||||
"highway/traffic_signals",
|
||||
"highway/turning_circle",
|
||||
"highway/mini_roundabout",
|
||||
"highway/motorway_junction",
|
||||
"vertex"
|
||||
],
|
||||
"relation": [
|
||||
"category-route",
|
||||
"category-restriction",
|
||||
"type/boundary",
|
||||
"type/multipolygon",
|
||||
"type/site",
|
||||
"relation"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+1559
-1557
File diff suppressed because it is too large
Load Diff
+37511
-37509
File diff suppressed because it is too large
Load Diff
@@ -117,4 +117,4 @@ imagery.sort(function(a, b) {
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
|
||||
fs.writeFileSync('data/imagery.json', JSON.stringify(imagery, null, 4));
|
||||
fs.writeFileSync('data/imagery.json', JSON.stringify({ dataImagery: imagery }, null, 4));
|
||||
|
||||
@@ -30,7 +30,7 @@ asyncMap(resources, getResource, function(err, locales) {
|
||||
if (err) return console.log(err);
|
||||
|
||||
var locale = _.merge(sourceCore, sourcePresets),
|
||||
codes = [];
|
||||
data = { locales: [] };
|
||||
|
||||
locales.forEach(function(l) {
|
||||
locale = _.merge(locale, l);
|
||||
@@ -38,11 +38,13 @@ asyncMap(resources, getResource, function(err, locales) {
|
||||
|
||||
for (var i in locale) {
|
||||
if (i === 'en' || _.isEmpty(locale[i])) continue;
|
||||
codes.push(i);
|
||||
fs.writeFileSync(outdir + i + '.json', JSON.stringify(locale[i], null, 4));
|
||||
data.locales.push(i);
|
||||
var obj = {};
|
||||
obj.locale[i] = locale[i];
|
||||
fs.writeFileSync(outdir + i + '.json', JSON.stringify(obj, null, 4));
|
||||
}
|
||||
|
||||
fs.writeFileSync('data/locales.json', JSON.stringify(codes, null, 4));
|
||||
fs.writeFileSync('data/locales.json', JSON.stringify(data, null, 4));
|
||||
});
|
||||
|
||||
function getResource(resource, callback) {
|
||||
|
||||
Vendored
+4248
-4246
File diff suppressed because it is too large
Load Diff
@@ -322,7 +322,7 @@ export function coreContext(root) {
|
||||
if (locale && locale !== 'en' && dataLocales.indexOf(locale) !== -1) {
|
||||
localePath = localePath || context.asset('locales/' + locale + '.json');
|
||||
d3.json(localePath, function(err, result) {
|
||||
addTranslation(locale, result);
|
||||
addTranslation(locale, result[locale]);
|
||||
setLocale(locale);
|
||||
cb();
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { coreGraph } from '../../core/graph';
|
||||
import { modeBrowse } from '../../modes/index';
|
||||
import { osmEntity } from '../../osm/entity';
|
||||
import { d3curtain } from '../../util/curtain';
|
||||
import { default as introGraphRaw } from '../../../data/intro_graph.json';
|
||||
import { dataIntroGraph } from '../../../data/intro_graph.json';
|
||||
|
||||
import { uiIntroNavigation } from './navigation';
|
||||
import { uiIntroPoint } from './point';
|
||||
@@ -76,8 +76,8 @@ export function uiIntro(context) {
|
||||
|
||||
var introGraph = {};
|
||||
|
||||
for (var key in introGraphRaw) {
|
||||
introGraph[key] = osmEntity(introGraphRaw[key]);
|
||||
for (var key in dataIntroGraph) {
|
||||
introGraph[key] = osmEntity(dataIntroGraph[key]);
|
||||
var name = localizedName(key);
|
||||
if (name) {
|
||||
introGraph[key].tags.name = name;
|
||||
|
||||
Reference in New Issue
Block a user