Skip to contents

A leaflet plugin for NASA EOSDIS GIBS imagery integration. 154 products are available. The date can be set dynamically for multi-temporal products. No-data pixels of MODIS Multiband Imagery can be made transparent.

Usage

addGIBS(
  map,
  layers = NULL,
  group = NULL,
  dates = NULL,
  opacity = 0.5,
  transparent = TRUE
)

Arguments

map

a map widget object created from leaflet()

layers

A character vector of GIBS-layers. See gibs_layers

group

the name of the group the newly created layers should belong to (for clearGroup and addLayersControl purposes). Human-friendly group names are permitted–they need not be short, identifier-style names. Any number of layers and even different types of layers (e.g. markers and polygons) can share the same group name.

dates

Date object. If multiple layers are added, you can add a Date vector of the same length

opacity

Numeric value determining the opacity. If multiple layers are added, you can add a numeric vector of the same length

transparent

Should the layer be transparent. If multiple layers are added, you can add a boolean vector of the same length

Value

the new map object

See also

Other GIBS Functions: setDate(), setTransparent()

Examples

library(leaflet)
library(leaflet.extras2)

layers <- gibs_layers$title[c(35, 128, 185)]

leaflet() %>%
  addTiles() %>%
  setView(9, 50, 4) %>%
  addGIBS(
    layers = layers,
    dates = Sys.Date() - 1,
    group = layers
  ) %>%
  addLayersControl(overlayGroups = layers)