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

Allow internally consistent aliases for the MapPanel layers attribute #2042

Open
sgdecker opened this issue Aug 24, 2021 · 4 comments
Open
Labels
Type: Feature New functionality

Comments

@sgdecker
Copy link
Contributor

Pulled from discussion under #2016:

Currently, the strings used to specify the layers of a MapPanel, such as
panel.layers = ['coastline', 'borders', 'states']
are maddeningly inconsistent.

Why is coastline singular? borders is vague; why isn't it countries?

I propose that we allow aliases ('coastlines' = 'coastline', 'countries' = 'borders', and perhaps others).

Perhaps a 'default' alias (equivalent to ['coastline', 'borders', 'states']) would be nice as well.

@sgdecker sgdecker added the Type: Feature New functionality label Aug 24, 2021
@dopplershift
Copy link
Member

I really don't like the idea of a "default" that isn't actually...the default value. And we can't change the default until 2.0. I've not been able to come up with a better name, though.

@kgoebber
Copy link
Collaborator

@dopplershift what about "standard"?

@dopplershift
Copy link
Member

"standard" seems fine. Now, would that be set as 'standard' or ['standard']. Would we support then ['standard', 'uscounties']?

@sgdecker
Copy link
Contributor Author

Great questions. Since the current implementation requires a list (or tuple), it seems ['standard'] would be the way to go. I suppose support for a string as an alternative to a list with one item could be added, but that's a separate feature, and you can already do panel.layers = 'states', (or perhaps in the future, panel.layers = 'standard',) and it will work, so I'm not sure it is worth it just to save a comma.

I think it would make sense to support additional items in a list where 'standard' is present, in any order (so ['uscounties', 'standard'] should also work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New functionality
Projects
None yet
Development

No branches or pull requests

3 participants