diff --git a/lib/streams/layerMappingStream.js b/lib/streams/layerMappingStream.js index 785f878..a7d30bc 100644 --- a/lib/streams/layerMappingStream.js +++ b/lib/streams/layerMappingStream.js @@ -5,6 +5,8 @@ function featureCodeToLayerDefault(featureCode) { switch (featureCode) { case 'PCLI': return 'country'; + case 'PCLD': + return 'dependency'; case 'ADM1': return 'region'; case 'ADM2': diff --git a/test/streams/layerMappingStreamTest.js b/test/streams/layerMappingStreamTest.js index 5077309..978eb64 100644 --- a/test/streams/layerMappingStreamTest.js +++ b/test/streams/layerMappingStreamTest.js @@ -19,6 +19,16 @@ tape('featureCodeToLayer', function(test) { t.end(); }); + test.test('PCLI maps to country', function (t) { + t.equal(featureCodeToLayer('PCLI'), 'country', 'Geonames PCLI maps to country layer'); + t.end(); + }); + + test.test('PCLD maps to dependency', function (t) { + t.equal(featureCodeToLayer('PCLD'), 'dependency', 'Geonames PCLD maps to dependency layer'); + t.end(); + }); + test.test('ADM1 maps to region', function(t) { t.equal(featureCodeToLayer('ADM1'), 'region', 'Geonames ADM1 maps to region layer'); t.end();