Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies in labels #56

Open
Joxit opened this issue Jan 17, 2023 · 0 comments
Open

Inconsistencies in labels #56

Joxit opened this issue Jan 17, 2023 · 0 comments
Labels

Comments

@Joxit
Copy link
Member

Joxit commented Jan 17, 2023

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.

@Joxit Joxit added the question label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant