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"] "regional": ["admin1_abbr", "admin1", "admin0"]
}, },
"GBR": { "GBR": {
"local": ["admin2","neighborhood", "local_admin", "locality"], "local": ["neighborhood", "admin2", "local_admin", "locality"],
"regional": ["admin0","admin1"] "regional": ["admin2","admin0","admin1"]
}, },
"default": { "default": {
"local": ["local_admin", "locality", "neighborhood", "admin2"], "local": ["local_admin", "locality", "neighborhood", "admin2"],

16
test/unit/helper/geojsonify.js

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

Loading…
Cancel
Save