|
@@ -4,6 +4,7 @@ library(leaflet)
|
4
|
4
|
library(rgdal)
|
5
|
5
|
library(dplyr)
|
6
|
6
|
library(leaflet.extras)
|
|
7
|
+library(shinyWidgets)
|
7
|
8
|
|
8
|
9
|
source("leafletfunctions.R")
|
9
|
10
|
|
|
@@ -97,6 +98,9 @@ ui <- fluidPage(
|
97
|
98
|
inline = FALSE),
|
98
|
99
|
div(id="locinfo",
|
99
|
100
|
htmlOutput("lochtml"))),
|
|
101
|
+ absolutePanel(top = 25, right = 10, id="control2",
|
|
102
|
+ materialSwitch("controlswitch", value=TRUE, right=TRUE,
|
|
103
|
+ inline=TRUE, status="info")),
|
100
|
104
|
absolutePanel(bottom = 30, left = 10, id="loading",
|
101
|
105
|
p("Loading..."))
|
102
|
106
|
)
|
|
@@ -235,6 +239,10 @@ random rounding</a>
|
235
|
239
|
observeEvent(input$radiocolour, ignoreInit = TRUE, {
|
236
|
240
|
updateMap()
|
237
|
241
|
})
|
|
242
|
+ observeEvent(input$controlswitch, ignoreInit = TRUE, {
|
|
243
|
+ shinyjs::toggleElement("mapcontrol", anim=TRUE,
|
|
244
|
+ time = 0.5)
|
|
245
|
+ })
|
238
|
246
|
output$lochtml <- renderUI({
|
239
|
247
|
seled <- sel.SA2.code()
|
240
|
248
|
seled <- ifelse(is.na(seled), 0, seled)
|