Hi there, I hope you are doing well
I was working on a refactoring to avoid duplicate names and wonder why do we need dedupeNameAndFirstLabelElement function...
I found this test which requires the use of the hierarchy country name, this test comes from the v1.0.0
|
test('country layer labels should only use the `country` field and not the `name`', function(t) { |
|
var doc = { |
|
'name': { 'default': 'source country name' }, |
|
'layer': 'country', |
|
'country_a': ['country code'], |
|
'country': ['hierarchy country name'] |
|
}; |
|
t.equal(generator(doc),'hierarchy country name'); |
|
t.end(); |
|
}); |
In my refactoring, I'm trying to use the name of the object instead of the hierarchy, even if its a coarse layer.
Hi there, I hope you are doing well
I was working on a refactoring to avoid duplicate names and wonder why do we need
dedupeNameAndFirstLabelElementfunction...I found this test which requires the use of the
hierarchy country name, this test comes from the v1.0.0labels/test/labelGenerator_default.js
Lines 236 to 245 in e60f6b1
In my refactoring, I'm trying to use the name of the object instead of the hierarchy, even if its a coarse layer.