Nothing
```{asis, echo = {{select_query_knit}}, eval = {{select_query_knit}}, include = {{select_query_knit}}} Loads the raster image for the area selected on the map
```r}, include = {{select_query_knit}}} poly <- {{select_query_poly}} token <- {{select_query_token}} raster <- select_query(poly, {{select_query_date}}, token) raster_name <- {{select_query_name}} raster_extent <- as.vector(terra::ext(raster)) map_pal <- RColorBrewer::brewer.pal(9, "Greens") custom_greens <- colorRampPalette(map_pal)(10) color_bins <- colorBin(custom_greens, domain = terra::values(raster), bins = 10, na.color = "pink") leaflet() |> addProviderTiles("Esri.WorldTopoMap") |> addRasterImage(raster, colors = color_bins, group = raster_name) |> addTiles(urlTemplate = "", attribution = "MODIS data via LAADS DAAC") |> fitBounds(lng1 = raster_extent[[1]], lng2 = raster_extent[[2]], lat1 = raster_extent[[3]], lat2 = raster_extent[[4]]) |> addLegend(position = "bottomright", pal = color_bins, values = terra::values(raster), group = raster_name, title = raster_name, layer = raster_name)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.