Open stefanlinner opened 2 months ago
Would also appreciate this! I was playing a bit with adding an invisible other layer that ONLY has tooltips+ popups so that the re-drawing is at least invisible, but using a set_* function for tooltips or popups would be preferable
Interesting idea of adding an invisible layer! Would you have an example for me? How exactly do you make it "invisible"?
I just set opacity to 0!
mapgl::add_fill_layer(
id = "tooltips"
,source =
data
,fill_opacity = 0
,popup =
"infoboxes"
,tooltip =
"rounded.vals"
)
That's a clever workaround! Thanks!
Thanks -- though it still slows down app b/c it is redrawing the invisible layer :. But allows a fast option w/o tooltips and a slower one with them.
Hi,
I have the following use case: A user can change the
fill_color
variable by clicking a button. This already works fine using theset_paint_property()
function. However, I would also like to set a newtooltip
variable (as suggested by the outcommented code). It would be great if this could be done using aset_*()
function that does not require redrawing thefill_layer
. Currently I'm accomplishing this by firstclear_layer("fill")
and then againadd_fill_layer(...)
with the updated tooltip. However, this results in redrawing thefill_layer
and with a set-update it would be much nicer and more performant.Out of curiosity: Is it generally also possible to update the
source
dataset using aset_*
function?Thanks again for your great work, very appreaciated!