L.esri.RasterLayer

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.
opacity Number 1 Opacity of the layer. Should be a value between 0 and 1.
position String 'front' Position of the layer relative to other overlays.
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.

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.

Edit this page on GitHub