L.esri.RasterLayer

Extends L.ImageOverlay

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

Options

Option Type Default Description
f String 'image' Server response content type "json" | "image".
opacity Number 1 Opacity of the layer. Should be a value between 0 and 1.
pane String overlayPane The map pane to render on. This is the preferred technique to control draw order in Leaflet 1.x.
zIndex Number Used to refine draw order further (within a map pane).
position String 'front' Legacy option to control draw order. For best results, use pane.
maxZoom Number Closest zoom level the layer will be displayed on the map.
minZoom Number Furthest zoom level the layer will be displayed on the map.
to Date Used to filter what is drawn from the service based on a time range.
from Date Used to filter what is drawn from the service based on a time range.

Methods

Method Returns Description
bringToBack() this Redraws this layer below all other overlay layers.
bringToFront() this Redraws this layer above all other overlay layers.
getOpacity() Float Returns the current opacity of the layer.
setOpacity(<Float> opacity) this Sets the opacity of the layer.
getTimeRange() Array Returns the current time range being used for rendering.
setTimeRange(<Date> from, <Date> to) this Redraws 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) this Authenticates 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

Event Data Description
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.

Edit this page on GitHub