Repository navigation
Conversation
|
@e-kotov can you elaborate a bit more on why this is needed? With the helper function Regarding the issue that it does not work when the layer share the same source, that's a good catch! No need for a PR, that should be an easy fix to be done on my side. |
|
@tim-salabim With the current CRAN versions, listing a GeoArrow layer’s # Current CRAN versions
add_layers_control(layers = list(
"Test area" = generateDeckglLayerId("test-area")
))With the changes in the # With both PRs
add_layers_control(layers = list(
"Test area" = "test-area"
))So far, this does not mean that the |
|
@e-kotov I just pushed a fix which separates In general, regarding this PR, I am a bit hesitant on the proposed changes here, as it means diversion from the core behaviour of how Deck.gl integrates with maplibre.gl... For a low-level package like this one, I am mostly fine with some more code effort required in the API. But I am still open to be convinced otherwise :-) |
But why do you consider it low level? In my mind this is a direct extension of 'mapgl' and I (putting myself in lay-user's shoes) would expect it to work very similar to 'mapgl''s own layers (which, btw, includes the style of arguments in the layers). I will have a look what you changed and what needs to be changed in this PR. |
|
Update: after your changes in main this PR does not need any updates. |
This PR connects
{deckglgeoarrow}to{mapgl}’s layer visibility provider API, so GeoArrow layers can be turned on and off from mapgl’s layer selector. This depends on{mapgl}PR #225 being merged (cc @walkerke).There is a separate issue in
{deckglgeoarrow}: when two GeoArrow layers use the samesource=, they share one selector entry and turn on or off together. That may be surprising if someone wants to control those layers separately. Fixing it would mean changing how{deckglgeoarrow}assigns IDs to its layers and sources.@tim-salabim I’ve kept that separate from this PR. Would it be useful for me to prepare a follow-up PR so layers that share a source can still be toggled independently?