Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addEsriImageMapLayer

Render and visualize Image Services from ArcGIS Online and ArcGIS Server.


Description

Image Services provide access to raster data through a web service.

Usage

addEsriImageMapLayer(map, url, options = imageMapLayerOptions(),
  popupFunction = NULL, popupOptions = NULL, layerId = NULL,
  group = NULL)

Arguments

map

The leaflet map

url

URL of the Image Service

options

options for the image map layer.

popupFunction

Uses the provided function to create a popup that will identify features whenever the map is clicked. Your function will be passed a GeoJSON FeatureCollection of the features at the clicked location and should return the appropriate HTML. If you do not want to open the popup when there are no results, return false.

popupOptions

See popupOptions.

layerId

A unique ID for the layer.

group

The name of the group this layer should be added to.

Examples

leaflet() %>%
  addEsriBasemapLayer(esriBasemapLayers$Imagery) %>%
  setView(-120.23, 43.5, 5)  %>%
  addEsriImageMapLayer(
    url = paste0(
      "http://imagery.oregonexplorer.info/arcgis/rest/services/", 
      "NAIP_2011/NAIP_2011_Dynamic/ImageServer"
    ),
    options = imageMapLayerOptions(bandIds = c(3, 0, 1)))

## for more examples see
# browseURL(system.file("examples/imageMapLayers.R", package = "leaflet.esri"))

leaflet.esri

'ESRI' Bindings for the 'leaflet' Package

v1.0.0
GPL-3 | file LICENSE
Authors
Bhaskar Karambelkar [aut, cre], Barret Schloerke [aut], Patrick Arlt [ctb, cph] (esri-leaflet, esri-leaflet-cluster, esri-leaflet-geocoder, and esri-leaflet-heatmap libraries), Rachel Nehmer [ctb, cph] (esri-leaflet-renderers library), Vladimir Agafonkin [ctb, cph] (leaflet.heat and simpleheat libraries), Leaflet [ctb, cph] (leaflet.markercluster library)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.