station_map: Mapping function for the first tab of the flomvarsling...

Description Usage Arguments Value Examples

View source: R/mapping_functions.R

Description

Mapping function for the first tab of the flomvarsling ShinyApp. This function is called by the shiny server module "mapModule"

Usage

1
2
3
4
station_map(stations, selected_nbname = NULL, selected_long = NULL,
  selected_lat = NULL, variable2plot = "Ingen",
  map_layer = "Openstreetmap", catchments = FALSE, radius_function = TRUE,
  popups = FALSE)

Arguments

stations

It is a global variable in the Shiny App but is included here as a parameter for general use. See global.R for the data preparation

selected_nbname

Selected station in the following format. "2.11-narsj<c3><b8>". This can be a vector

selected_long
selected_lat
variable2plot

"Fare for flom", "Usikkerhet" or "Ingen"

map_layer

"Openstreetmap" by default. Other choices: "Topo kart" or "Flyfoto"

catchments

Specify TRUE if you want to see the catchment boundaries

radius_function

Default "TRUE". Functions which makes marker size proportional to the variable2plot value

popups

Specify TRUE if you want to see have popups for the selected stations

Value

map Returns a map that is used by "mapModule"

Examples

1
2
3
This is how we use this function in the shiny server module "mapModule"
output$map <- renderLeaflet({station_map(stations, input$station, selected_long(),
selected_lat(), variable2plot = input$variable, map_layer = input$map_layer, catchments = input$catchments, popups = input$popups)})

NVE/Flood_forecasting documentation built on May 7, 2019, 6:04 p.m.