2
有没有什么方法可以在R中获取小册子的自定义标记图标?我曾尝试使用教程中提供的示例代码,但makeIcon函数似乎不存在。我试过的代码在这里,但没有奏效。小册子中的自定义标记
http://rstudio.github.io/leaflet/markers.html
任何建议,将不胜感激。总体目标是将其实现为一个闪亮的Web应用程序。
非常感谢
有没有什么方法可以在R中获取小册子的自定义标记图标?我曾尝试使用教程中提供的示例代码,但makeIcon函数似乎不存在。我试过的代码在这里,但没有奏效。小册子中的自定义标记
http://rstudio.github.io/leaflet/markers.html
任何建议,将不胜感激。总体目标是将其实现为一个闪亮的Web应用程序。
非常感谢
的makeIcon
功能的确存在,至少在我的宣传单包.. 下面的代码(从tutorial)正常工作对我..
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)