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 layering of base tiles and other map layers with different z-indices (if possible with deck.gl) #389

Open
kmcd39 opened this issue Jul 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@kmcd39
Copy link

kmcd39 commented Jul 1, 2024

I'm making plans to switch from leaflet to either deck.gl or maplibre gl js for a lot of my interactive mapping / shiny development work.

Using R/leaflet, I made a practice of initializing maps with different layers: one w/o labels and another with labels separate, and I put the data between them by setting z-indices.

For example, in leaflet, I had:

leaflet() %>%
    addMapPane("tileLabels", # place name labels
               zIndex = 599) %>%
    addProviderTiles(providers$CartoDB.PositronNoLabels) %>%
    addProviderTiles(providers$CartoDB.PositronOnlyLabels,
                     group = 'Place names',
                     options =
                       providerTileOptions(
                         pane = "tileLabels",
                       )) 

And then I could also add map panes for the data with a z-index between the NoLabel layer and the OnlyLabel layer, and give user ability to toggle labels on/off, and have labels appear above the data by default.

I don't see a way to layer provider tiles or basemaps in deck.gl using mapdeck! I'd be very interested in this feature for this package. I'm planning to check if this would be workable using the rdeck package as well / instead of mapdeck.

@kmcd39 kmcd39 added the enhancement New feature or request label Jul 1, 2024
@dcooley
Copy link
Collaborator

dcooley commented Jul 1, 2024

I'm not that familiar with leaflet or what you're trying to achieve, but given your other comment in #365 perhaps mapdeck::update_style() is useful for you?

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

No branches or pull requests

2 participants