Bladeren bron

Remove diy search

Petra Lamborn 4 jaren geleden
bovenliggende
commit
2b370d6450
1 gewijzigde bestanden met toevoegingen van 0 en 22 verwijderingen
  1. 0
    22
      MedicalCentres/app.R

+ 0
- 22
MedicalCentres/app.R Bestand weergeven

@@ -101,12 +101,6 @@ ui <- fillPage(title = "New Zealand GP Practice Locations 2017",
101 101
                }"),
102 102
     div(class = "dropdowncont",
103 103
     dropdownButton(
104
-      searchInput("mapsearch",
105
-                  placeholder = "Search GP practices by name",
106
-                  btnSearch = icon("search"), 
107
-                  btnReset = icon("remove"), 
108
-                  width = "100%"),
109
-      hr(),
110 104
       radioButtons("selcol", "Colour by",
111 105
                    choices = c("None" = "None",
112 106
                                "DHB affiliation" = "DHB",
@@ -169,22 +163,6 @@ server <- function(input, output, session) {
169 163
       }
170 164
     })
171 165
 
172
-    observeEvent(input$mapsearch, {
173
-      ms <- input$mapsearch
174
-      if (ms != "") {
175
-        dists <- as.vector(adist(ms, Geo2017$name, 
176
-                                 costs = c("in" = 1, "del" = 1, "sub" = 1), 
177
-                                 fixed = TRUE,
178
-                                 partial = TRUE,
179
-                                 ignore.case = TRUE))
180
-        md <- which.min(dists)
181
-        updateSearchInput(session, inputId = "mapsearch", value = Geo2017$name[md])
182
-        leafletProxy("medmap") %>% setView(lng = Geo2017$lon[md],
183
-                                         lat = Geo2017$lat[md],
184
-                                         zoom = 13)
185
-      }
186
-    })
187
-
188 166
 }
189 167
 
190 168
 # Run the application