Browse Source

update output schema for GBR

pull/38/head
Peter Johnson 10 years ago
parent
commit
cb63791669
  1. 4
      helper/outputSchema.json
  2. 16
      test/unit/helper/geojsonify.js

4
helper/outputSchema.json

@ -4,8 +4,8 @@
"regional": ["admin1_abbr", "admin1", "admin0"]
},
"GBR": {
"local": ["admin2","neighborhood", "local_admin", "locality"],
"regional": ["admin0","admin1"]
"local": ["neighborhood", "admin2", "local_admin", "locality"],
"regional": ["admin2","admin0","admin1"]
},
"default": {
"local": ["local_admin", "locality", "neighborhood", "admin2"],

16
test/unit/helper/geojsonify.js

@ -42,11 +42,7 @@ module.exports.tests.search = function(test, common) {
"input": [
"'round midnight jazz and blues bar"
],
"payload": {
"id": "osmnode/2208150035",
"geo": "-0.10697160000000001,51.53371440000001"
},
"output": "'Round Midnight Jazz and Blues Bar, Angel, United Kingdom"
"output": "osmnode:2208150035"
}
},
{
@ -72,11 +68,7 @@ module.exports.tests.search = function(test, common) {
"input": [
"blues cafe"
],
"payload": {
"id": "osmway/147495160",
"geo": "-0.101795,51.517806"
},
"output": "Blues Cafe, test3, COL"
"output": "osmway:147495160"
}
}
];
@ -97,7 +89,7 @@ module.exports.tests.search = function(test, common) {
"id": "id1",
"type": "type1",
"layer": "type1",
"text": "'Round Midnight Jazz and Blues Bar, Angel, United Kingdom",
"text": "'Round Midnight Jazz and Blues Bar, test3, Angel",
"name": "'Round Midnight Jazz and Blues Bar",
"alpha3": "GBR",
"admin0": "United Kingdom",
@ -122,7 +114,7 @@ module.exports.tests.search = function(test, common) {
"id": "id2",
"type": "type2",
"layer": "type2",
"text": "Blues Cafe, Smithfield, United Kingdom",
"text": "Blues Cafe, test3, Smithfield",
"name": "Blues Cafe",
"alpha3": "GBR",
"admin0": "United Kingdom",

Loading…
Cancel
Save