我刚刚注意到,应用任何格式时,Leaflet Shiny 中的弹出窗口不会更新。当我使用时:
addMarkers(points1$Lon,points1$Lat
,popup= paste(sep = "<br/>",
strong(points1$Suspension_ID),
paste(points1$Street,points1$Zone), points1$Reason,
paste(points1$Bay_Type, "-" , points1$Spaces, "Space(s)"),
em(points1$Location),
paste(points1$Start_Date, " TO ", points1$End_Date), points1$Time_Details)
斜体或粗体的线条在地图上具有相同的值,而如果我跳过 em/strong 标签,则每行都具有正确的唯一值。所有其他弹出值(未格式化)均正常运行 - 每个标签都包含数据中的内容。你知道为什么会这样吗?
我添加了额外的粘贴功能,并更改为更多的html代码。这应该有效。我用我的数据在我的机器上运行它并且它有效,但是我没有你的数据集,所以你可能需要稍微操作一下 () 。如果您发布您的数据集,我们可以共同努力使其顺利运行。
addMarkers(points1$Lon,points1$Lat ,popup= paste(paste(
"<strong>", points1$Suspension_ID, "</strong>"),
paste(points1$Street,points1$Zone, points1$Reason),
paste(points1$Bay_Type, "-" , points1$Spaces, "Space(s)"),
paste("<em>", points1$Location, "</em>"),
paste(points1$Start_Date, " TO ", points1$End_Date, points1$Time_Details)))