diff --git a/helper/geojsonify.js b/helper/geojsonify.js index a2dc3e2b..666ab60c 100644 --- a/helper/geojsonify.js +++ b/helper/geojsonify.js @@ -35,6 +35,9 @@ var DETAILS_PROPS = [ 'locality', 'locality_gid', 'locality_a', + 'borough', + 'borough_gid', + 'borough_a', 'neighbourhood', 'neighbourhood_gid', 'bounding_box' diff --git a/helper/labelSchema.js b/helper/labelSchema.js index 5d3eba5d..32207cba 100644 --- a/helper/labelSchema.js +++ b/helper/labelSchema.js @@ -3,7 +3,7 @@ var _ = require('lodash'), module.exports = { 'USA': { - 'local': getFirstProperty(['localadmin', 'locality', 'neighbourhood', 'county']), + 'local': getFirstProperty(['borough', 'localadmin', 'locality', 'neighbourhood', 'county']), 'regional': getUsState, 'country': getFirstProperty(['country_a']) }, diff --git a/test/unit/helper/labelSchema.js b/test/unit/helper/labelSchema.js index edbf2b77..fd5b7e91 100644 --- a/test/unit/helper/labelSchema.js +++ b/test/unit/helper/labelSchema.js @@ -772,6 +772,21 @@ module.exports.tests.default = function(test, common) { }); + test('USA.local borough should be shown if available', function(t) { + var record = { + borough: 'borough value', + region: 'region value', + region_a: 'region_a value', + country_a: 'country_a value' + }; + + var labelParts = ['initial value']; + + var f = schemas.USA.local; + + t.deepEqual(f(record, labelParts), ['initial value', 'borough value']); + t.end(); + }); }; module.exports.all = function (tape, common) {