我有以下閃亮的應用:https://ahmadmobin.shinyapps.io/Understanding_STOP/[R單張搜索功能
的「位置」選項卡下,我有一個單張地圖。我想將搜索欄移到左側。如果可能的話,我想也想addResetMapButton()但它是沒有必要的。
這裏是我的R代碼裏面:
output$mymap <- renderLeaflet({
leaflet(Locations) %>%
addTiles() %>%
addCircleMarkers(color = Locations$color,clusterOptions= markerClusterOptions,
label=~Official_Name_of_Agency, popup=~geoAddress, group='Locations') %>%
addLegend(labels = c("AA", "CHC", "FHT", "NPLC"), colors = c("black", "purple", "blue", "yellow")) %>%
addProviderTiles(providers$Stamen.TonerLite,
options = providerTileOptions(noWrap = TRUE)) %>%
addSearchOSM(options = searchOSMOptions())
嗨eclark,感謝找回。請參閱下面的回覆。週末愉快! –
它似乎並沒有工作: style.css file #mymap> div.leaflet-control-container> div.leaflet-top.leaflet-right> div.leaflet-control-search.leaflet-control {margin -left:10px important;} UI: tabItem(tabName =「fourth」, tags $ head(tags = $ link(rel =「stylesheet」,type =「text/css」,href =「style.css 「)), leafletOutput(」mymap「,height = 700) ), –