diff --git a/helper/type_mapping.js b/helper/type_mapping.js index ed20c0d86..59dbb5908 100644 --- a/helper/type_mapping.js +++ b/helper/type_mapping.js @@ -47,7 +47,8 @@ var SOURCE_MAPPING = addStandardTargetsToAliases(SOURCES, SOURCE_ALIASES); var LAYERS_BY_SOURCE = { openstreetmap: [ 'address', 'venue' ], openaddresses: [ 'address' ], - geonames: [ 'country', 'region', 'county', 'locality', 'venue' ], + geonames: [ 'country','macroregion', 'region', 'county','localadmin', + 'locality', 'neighbourhood', 'venue' ], whosonfirst: [ 'continent', 'country', 'dependency', 'macroregion', 'region', 'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', 'neighbourhood', 'microhood', 'disputed'] diff --git a/test/unit/sanitiser/_sources_and_layers.js b/test/unit/sanitiser/_sources_and_layers.js index 96001f4e7..dfb997faf 100644 --- a/test/unit/sanitiser/_sources_and_layers.js +++ b/test/unit/sanitiser/_sources_and_layers.js @@ -51,6 +51,17 @@ module.exports.tests.no_errors = function(test, common) { t.end(); }); +test('valid combination', function(t) { + var raw = {}; + var clean = { sources: ['geonames'], layers: ['macroregion'] }; + + 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 because of multiple sources', function(t) { var raw = {}; var clean = { sources: ['openstreetmap', 'openaddresses'], layers: ['venue'] };