Browse Source

keeping it consistent - alpha3 > admin0

output-generator-tweaks
Harish Krishna 10 years ago
parent
commit
386281a437
  1. 4
      helper/outputSchema.json
  2. 4
      test/unit/helper/geojsonify.js
  3. 2
      test/unit/helper/outputSchema.js

4
helper/outputSchema.json

@ -7,11 +7,11 @@
"GBR": {
"local": ["neighborhood", "local_admin", "locality"],
"regional": ["admin2", "admin1"],
"national": ["admin0", "alpha3"]
"national": ["alpha3", "admin0"]
},
"default": {
"local": ["local_admin", "locality", "neighborhood", "admin2"],
"regional": ["admin1_abbr", "admin1"],
"national": ["admin0", "alpha3"]
"national": ["alpha3", "admin0"]
}
}

4
test/unit/helper/geojsonify.js

@ -115,7 +115,7 @@ module.exports.tests.search = function(test, common) {
'properties': {
'id': 'id1',
'layer': 'type1',
'text': '\'Round Midnight Jazz and Blues Bar, test3, Angel, United Kingdom',
'text': '\'Round Midnight Jazz and Blues Bar, test3, Angel, GBR',
'name': '\'Round Midnight Jazz and Blues Bar',
'alpha3': 'GBR',
'admin0': 'United Kingdom',
@ -139,7 +139,7 @@ module.exports.tests.search = function(test, common) {
'properties': {
'id': 'id2',
'layer': 'type2',
'text': 'Blues Cafe, test3, Smithfield, United Kingdom',
'text': 'Blues Cafe, test3, Smithfield, GBR',
'name': 'Blues Cafe',
'alpha3': 'GBR',
'admin0': 'United Kingdom',

2
test/unit/helper/outputSchema.js

@ -17,7 +17,7 @@ module.exports.tests.valid = function(test, common) {
var default_schema = {
local: ['local_admin', 'locality', 'neighborhood', 'admin2'],
regional: ['admin1_abbr', 'admin1'],
national: ['admin0', 'alpha3']
national: ['alpha3', 'admin0']
};
var isValid = function(keys, schema) {

Loading…
Cancel
Save