1
我已經創建了自定義圖標的傳單地圖,並在www文件夾中有用於發佈的圖標。然而,在我發佈後,我無法看到圖標。我的代碼如下,它在Rstudio中正常工作。R Shiny:用自定義圖標發佈傳單地圖
oceanIcons <- iconList(
Rank1 = makeIcon("23-1.png", "[email protected]", 36, 36),
Rank2= makeIcon("23-2.png", "[email protected]", 36, 36),
Rank3= makeIcon("23-3.png", "[email protected]", 36, 36),
Rank4= makeIcon("23-4.png", "[email protected]", 36, 36),
Rank5= makeIcon("23-5.png", "[email protected]", 36, 36),
Rank0= makeIcon("circle2.png", "[email protected]", 48, 48)
)
map = leaflet(map_df) %>% addTiles() %>% addMarkers(icon = ~oceanIcons[map_df$rank],
popup=sprintf("<strong> %s <br>Expected Volume of Bike Departures: %s </br> Distance in Miles: %s <br>
%s</br></strong>"
,map_df$st_name,map_df$outbound,map_df$distance, map_df$rank))%>% addProviderTiles(providers$CartoDB.Positron)
是否有一個特別的原因,爲什麼這種方法不適用於傳單或發佈。
究竟你的意思是發佈? –