Skip to content

Rendering multiple maps in a Quarto doc creates issue with hovering and tooltips #217

@j-kind

Description

@j-kind

Hello @crazycapivara,

I'm trying to render several deckgl maps in a quarto document. The maps render and the tooltips for the first map works well, however there is an issue when I hover over the next maps, which should also have tooltips of their own set up. When I hover over say map 2 or 3 the tooltips for the first map appear on the first map itself in direct relation to where I'm hovering on any subsequent map. Any help would be appreciated. Here is some example code below. Each map is created in a separate code chunk in a new environment. I also have the same issue when attempting to render in an Rmd file.

map1 <- deckgl(zoom = 0.5, latitude = -7.152469, longitude = 3.885674, element_id = "map1") %>%
add_basemap() %>%
add_scatterplot_layer(
data = map1_data,
tooltip = "Name: {{map1_tooltip}}",
id = "map1",
properties = list(
getPosition = ~latitude + longitude,
getRadius = 100,
getFillColor = c(0, 0, 255, 255),
radiusScale = 1000
)

map1

map2 <- deckgl(zoom = 0.5, latitude = -7.152469, longitude = 3.885674, element_id = "map2") %>%
add_basemap() %>%
add_scatterplot_layer(
data = map2_data,
tooltip = "Name: {{map2_tooltip}}",
id = "map2",
properties = list(
getPosition = ~latitude + longitude,
getRadius = 100,
getFillColor = c(0, 0, 255, 255),
radiusScale = 1000
)
)

map2

Could you point me towards a workaround?

Thank you

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions