我有一个流程图 - 在 R 中使用传单
library(leaflet)
m <- leaflet(AM_Peak) %>%
addTiles('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
attribution='Map tiles by <a href="http://stamen.com">Stamen Design</a>,
<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>') %>%
setView(103.831959, 1.360270, zoom = 11) %>%
addCircles(~x_AM_Peak$Entry_Station_Long, ~x_AM_Peak$Entry_Station_Lat,
weight =x_AM_Peak$radius, radius=40,
label = ~as.character(x_AM_Peak$Entry_Station),color="#ffa500", stroke = TRUE, fillOpacity = 0.8) %>%
addPolylines(data = y_AM_Peak,
stroke = TRUE,color = "#6eff2a", weight = 0.2, opacity = 0.2,
fill = FALSE, fillOpacity = 0.1, dashArray = NULL,
smoothFactor = 1)
我要做的是 - 默认情况下,地图应该有所有圆圈 - 当我将鼠标悬停在圆圈点上时 - 它应该只显示从那个圆圈开始的所有折线(如链接所示)。