Description Usage Arguments Value Examples
View source: R/mapping_functions.R
Mapping function for the first tab of the flomvarsling ShinyApp. This function is called by the shiny server module "mapModule"
1 2 3 4 |
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 |
map Returns a map that is used by "mapModule"
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)})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.