L.esri.RasterLayer

Extends L.ImageOverlay

A generic class representing a map tile layer. This class can be extended to provide support for making export requests from ArcGIS REST services.

Options

OptionTypeDefaultDescription
fString'image'Server response content type "json" | "image".
opacityNumber1Opacity of the layer. Should be a value between 0 and 1.
paneStringoverlayPaneThe map pane to render on. This is the preferred technique to control draw order in Leaflet 1.x.
zIndexNumberUsed to refine draw order further (within a map pane).
positionString'front'Legacy option to control draw order. For best results, use pane.
maxZoomNumberClosest zoom level the layer will be displayed on the map.
minZoomNumberFurthest zoom level the layer will be displayed on the map.
toDateUsed to filter what is drawn from the service based on a time range.
fromDateUsed to filter what is drawn from the service based on a time range.

Methods

MethodReturnsDescription
bringToBack()thisRedraws this layer below all other overlay layers.
bringToFront()thisRedraws this layer above all other overlay layers.
getOpacity()FloatReturns the current opacity of the layer.
setOpacity(<Float> opacity)thisSets the opacity of the layer.
getTimeRange()ArrayReturns the current time range being used for rendering.
setTimeRange(<Date> from, <Date> to)thisRedraws the layer with he passed time range.
metadata(<Function> callback, <Object> context)this

Requests metadata about this Feature Layer. Callback will be called with error and metadata.

featureLayer.metadata(function(error, metadata){
    console.log(metadata);
});
authenticate(<String> token)thisAuthenticates this service with a new token and runs any pending requests that required a token.
redraw()Used to make a fresh request to the service and draw the response.

Events

EventDataDescription
loading<LoadingEvent>Fires when new features start loading.
load<LoadEvent>Fires when all features in the current bounds of the map have loaded.
error<Event>Fires when an image fails to load and ensures that the offending ImageOverlay is removed by the API.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.