瀏覽代碼

clear group instead of all markers

Petra Lamborn 4 年之前
父節點
當前提交
44482f02b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      MedicalCentres/app.R

+ 1
- 1
MedicalCentres/app.R 查看文件

@@ -141,7 +141,7 @@ server <- function(input, output, session) {
141 141
 
142 142
     observeEvent(input$selcol, {
143 143
       gl <- leafletProxy("medmap") %>%
144
-          clearMarkers()
144
+          clearGroup("locations")
145 145
       if (input$selcol == "Snargleflagen") {
146 146
           gl <- addMarkers(gl, lng = Geo2017$lon,
147 147
                      lat = Geo2017$lat,