我正在尝试从受互联网限制的计算机上的文件中添加自定义图标。当我通过https创建图标时:由于互联网的限制,它不起作用:(在常规计算机上,此代码可以正常工作)
airportsIcon <- makeIcon(
iconUrl = "http://maps.google.com/mapfiles/kml/shapes/airports.png"
)
leaflet() %>%
setView(-77.0369, 38.9072, 12) %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addWebGLKMLHeatmap(kml, size = 20, units = "px") %>%
addKML(
kml,
markerType = "marker",
markerIcons = airportsIcon
)
如果我尝试从文件中加载图标:
greenLeafIcon <- makeIcon(
iconUrl = "C:/Documents/airports.png"
)
它适用于传单包的addMarkers()函数,但不适用于上述的addKML()函数。我想念什么吗?