Browse Source

Updating list of layers for Geonames

pull/573/head
Alec Vulfson 9 years ago
parent
commit
35e548ef15
  1. 3
      helper/type_mapping.js
  2. 11
      test/unit/sanitiser/_sources_and_layers.js

3
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']

11
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'] };

Loading…
Cancel
Save