Vantor Interactive Imagery Explorer Shiny Module Server
Source:R/vantor_shiny.R
vantor_explorer_server.RdServer logic for the vantor_explorer_ui() Shiny module. Renders an
interactive leaflet map with Vantor Vivid basemaps, updates layers via
leaflet::leafletProxy(), queries WFS seamlines for the current viewport,
and provides a shiny::downloadHandler() with progress bar integration for
exporting GeoTIFFs via get_maxar_wms_basemap() or get_maxar_wms_tiles().
Arguments
- id
Character string. The Shiny module namespace ID.
- initial_bbox
Numeric vector of length 4 (
c(xmin, ymin, xmax, ymax)inEPSG:4326) or any spatial object supported byvantor_as_bbox()defining the initial map view. Defaults to downtown Denver, CO.- auth_reactive
Optional
shiny::reactivereturned byvantor_auth_server()to automatically refresh map layers when credentials change.- verbose
Logical. Print status messages to the R console. Default is
getOption("vantorr.verbose", TRUE).
Value
A list of shiny::reactive expressions:
bbox: Reactivesf::bbox(EPSG:4326) of the current map viewportseamlines: Reactivesfobject of WFS seamlines when inspectedproduct: Reactive selected Vivid product nameresolution: Reactive selected ground resolution in meters
Examples
if (requireNamespace("shiny", quietly = TRUE) &&
requireNamespace("leaflet", quietly = TRUE)) {
server <- function(input, output, session) {
explorer <- vantor_explorer_server("explorer", verbose = FALSE)
}
}