diff --git a/app.R b/app.R index 8569d38..92d3ca1 100644 --- a/app.R +++ b/app.R @@ -730,14 +730,15 @@ server <- function(input, output, session) { observeEvent(c(input$state, input$district, input$distance), { leafletProxy('reservoir_map', session) %>% # Clear substations and range circle upon update - clearGroup(group = list('substations', 'range')) %>% + clearGroup(group = list('substations', 'range', 'census_tract')) %>% # Census tract shading within the selected congressional district addPolygons( data = current_district(), fillColor = ~dist_pal()(Lowmod_pct), # color of census tract shading color = 'black', # color of census tract borders - fillOpacity = 0.75, # opacity of shading - weight = 0.75 # width of census tract border + fillOpacity = 0.7, # opacity of shading + weight = 0.75, # width of census tract border + group = 'census_tract' ) %>% # Substation range circle addCircles( @@ -755,7 +756,8 @@ server <- function(input, output, session) { data = cd_data(), weight = 2, fillOpacity = 0, - color = 'green' + color = 'green', + group = 'outline' ) %>% # Reservoirs addCircleMarkers(