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

Iconlayers polish #1475

Merged
merged 5 commits into from
Dec 17, 2023
Merged

Iconlayers polish #1475

merged 5 commits into from
Dec 17, 2023

Conversation

yohanboniface
Copy link
Member

Found some edge cases of the new tilelayer switcher this morning while testing it a bit more:

  • when importing a map with a background not in the 10 first layers
  • when choosing a tilelayer after the 10 first from the selector in edit mode

A bit of prettier noise…

At this stage, uMap does not distinguish between a custom background
and the default background, both are saved in map.options.tilelayer.

Given we want a custom background (so not in the list) to appear in
the selector, we need this check to be sure we are not adding again
one layer from the list
When an editor change the background layer from our own selector,
we need to inform iconLayers, so it can update its list and order
accordingly
@yohanboniface yohanboniface merged commit 3d92a8e into master Dec 17, 2023
12 checks passed
@yohanboniface yohanboniface deleted the iconlayers-polish branch December 17, 2023 08:59
@davidbgk
Copy link
Contributor

A bit of prettier noise…

Maybe we should force it through the CI?

if (this.customTilelayer) callback.call(context, this.customTilelayer)
this.tilelayers.forEach((layer) => callback.call(context, layer))
const urls = []
const callOne = (layer) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😉

@yohanboniface
Copy link
Member Author

Maybe we should force it through the CI?

Yes!

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

Successfully merging this pull request may close these issues.

2 participants