R 单张上的自定义标记
有没有办法为R中的传单获取自定义标记图标?我尝试过使用教程中提供的示例代码,但是makeIcon函数似乎不存在。我试过的代码在这里,但不起作用 如有任何建议,将不胜感激。总体目标是将其实现到一个闪亮的web应用程序中R 单张上的自定义标记,r,shiny,leaflet,R,Shiny,Leaflet,有没有办法为R中的传单获取自定义标记图标?我尝试过使用教程中提供的示例代码,但是makeIcon函数似乎不存在。我试过的代码在这里,但不起作用 如有任何建议,将不胜感激。总体目标是将其实现到一个闪亮的web应用程序中 非常感谢至少在我的传单包中,makeIcon功能确实存在。。 以下代码(来自)对我来说很好 greenLeafIcon <- makeIcon( iconUrl = "http://leafletjs.com/examples/custom-icons/leaf-gre
非常感谢至少在我的传单包中,
makeIcon
功能确实存在。。
以下代码(来自)对我来说很好
greenLeafIcon <- makeIcon(
iconUrl = "http://leafletjs.com/examples/custom-icons/leaf-green.png",
iconWidth = 38, iconHeight = 95,
iconAnchorX = 22, iconAnchorY = 94,
shadowUrl = "http://leafletjs.com/examples/custom-icons/leaf-shadow.png",
shadowWidth = 50, shadowHeight = 64,
shadowAnchorX = 4, shadowAnchorY = 62
)
leaflet(data = quakes[1:20,]) %>% addTiles() %>%
addMarkers(~long, ~lat, ~as.character(mag), icon = greenLeafIcon)
绿叶图标%addTiles()%%>%
addMarkers(~long、~lat、~as.character(mag),icon=greenleaveicon)