Browse Source

Merge pull request #612 from pelias/add-borough

Add borough as a possible layer for geonames
pull/623/head
Julian Simioni 8 years ago committed by GitHub
parent
commit
134d11beee
  1. 2
      helper/type_mapping.js
  2. 11
      test/unit/sanitiser/_sources_and_layers.js

2
helper/type_mapping.js

@ -48,7 +48,7 @@ var LAYERS_BY_SOURCE = {
openstreetmap: [ 'address', 'venue' ], openstreetmap: [ 'address', 'venue' ],
openaddresses: [ 'address' ], openaddresses: [ 'address' ],
geonames: [ 'country','macroregion', 'region', 'county','localadmin', geonames: [ 'country','macroregion', 'region', 'county','localadmin',
'locality', 'neighbourhood', 'venue' ], 'locality','borough', 'neighbourhood', 'venue' ],
whosonfirst: [ 'continent', 'country', 'dependency', 'macroregion', 'region', whosonfirst: [ 'continent', 'country', 'dependency', 'macroregion', 'region',
'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough',
'neighbourhood', 'microhood', 'disputed'] 'neighbourhood', 'microhood', 'disputed']

11
test/unit/sanitiser/_sources_and_layers.js

@ -52,6 +52,17 @@ module.exports.tests.no_errors = function(test, common) {
}); });
test('valid combination', function(t) { test('valid combination', function(t) {
var raw = {};
var clean = { sources: ['geonames'], layers: ['borough'] };
var messages = sanitize(raw, clean);
t.equal(messages.errors.length, 0, 'should return no errors');
t.equal(messages.warnings.length, 0, 'should return no warnings');
t.end();
});
test('valid combination', function(t) {
var raw = {}; var raw = {};
var clean = { sources: ['geonames'], layers: ['macroregion'] }; var clean = { sources: ['geonames'], layers: ['macroregion'] };

Loading…
Cancel
Save