mirror of https://github.com/pelias/api.git
Julian Simioni
9 years ago
15 changed files with 26 additions and 101 deletions
@ -1,15 +0,0 @@
|
||||
/* |
||||
* Mapping from data layers to type values |
||||
*/ |
||||
|
||||
module.exports = { |
||||
'venue': ['geoname','osmnode','osmway'], |
||||
'address': ['osmaddress','openaddresses'], |
||||
'country': ['admin0'], |
||||
'region': ['admin1'], |
||||
'county': ['admin2'], |
||||
'locality': ['locality'], |
||||
'localadmin': ['local_admin'], |
||||
'neighbourhood': ['neighborhood'], |
||||
'coarse': ['admin0','admin1','admin2','neighborhood','locality','local_admin'], |
||||
}; |
@ -1,14 +0,0 @@
|
||||
/* |
||||
* Mapping from data sources to type values |
||||
*/ |
||||
|
||||
module.exports = { |
||||
'gn' : ['geoname'], |
||||
'geonames' : ['geoname'], |
||||
'oa' : ['openaddresses'], |
||||
'openaddresses' : ['openaddresses'], |
||||
'qs' : ['admin0', 'admin1', 'admin2', 'neighborhood', 'locality', 'local_admin'], |
||||
'quattroshapes' : ['admin0', 'admin1', 'admin2', 'neighborhood', 'locality', 'local_admin'], |
||||
'osm' : ['osmaddress', 'osmnode', 'osmway'], |
||||
'openstreetmap' : ['osmaddress', 'osmnode', 'osmway'] |
||||
}; |
@ -1,16 +0,0 @@
|
||||
|
||||
// querable types
|
||||
|
||||
module.exports = [ |
||||
'geoname', |
||||
'osmnode', |
||||
'osmway', |
||||
'admin0', |
||||
'admin1', |
||||
'admin2', |
||||
'neighborhood', |
||||
'locality', |
||||
'local_admin', |
||||
'osmaddress', |
||||
'openaddresses' |
||||
]; |
@ -1,23 +0,0 @@
|
||||
|
||||
var types = require('../../../query/types'); |
||||
|
||||
module.exports.tests = {}; |
||||
|
||||
module.exports.tests.interface = function(test, common) { |
||||
test('valid interface', function(t) { |
||||
t.true(Array.isArray(types), 'valid array'); |
||||
t.equal(types.length, 11, 'valid array'); |
||||
t.end(); |
||||
}); |
||||
}; |
||||
|
||||
module.exports.all = function (tape, common) { |
||||
|
||||
function test(name, testFunction) { |
||||
return tape('types ' + name, testFunction); |
||||
} |
||||
|
||||
for( var testCase in module.exports.tests ){ |
||||
module.exports.tests[testCase](test, common); |
||||
} |
||||
}; |
Loading…
Reference in new issue