Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: LayerDrawingOptions

require(["esri/layers/LayerDrawingOptions"], function(LayerDrawingOptions) { /* code goes here */ });

Description

(Added at v2.7)
The LayerDrawingOptions class provides options for setting ArcGISDynamicMapServiceLayer rendering options. Requires ArcGIS Server 10.1 or greater.

Samples

Search for samples that use this class.

Constructors

NameSummary
new LayerDrawingOptions(json?)Creates a new LayerDrawingOptions object.

Properties

NameTypeSummary
labelingInfoLabelClass[]Define labels of dynamicLayers.
rendererRendererThe renderer to use for the dynamic layer.
scaleSymbolsBooleanDetermines if the layer renders the symbols based on scale.
showLabelsBooleanDetermines if labels are displayed.
transparencyNumberThe transparency of the layer.

Methods

NameReturn typeSummary
toJson()ObjectConverts object to its ArcGIS Server JSON representation.
Constructor Details

new LayerDrawingOptions(json?)

Creates a new LayerDrawingOptions object.
Parameters:
<Object> json Optional JSON object representing the LayerDrawingOptions.
Sample:
require([
  "esri/layers/LayerDrawingOptions", ... 
], function(LayerDrawingOptions, ... ) {
  var layerDrawingOption = new LayerDrawingOptions();
  ...
});
Property Details

<LabelClass[]> labelingInfo

Define labels of dynamicLayers. (Added at v3.6)

<Renderer> renderer

The renderer to use for the dynamic layer.
Sample:
require([
  "esri/layers/LayerDrawingOptions", "esri/renderers/SimpleRenderer", ... 
], function(LayerDrawingOptions, SimpleRenderer, ... ) {
  var layerDrawingOptions = new LayerDrawingOptions( ... );
  var renderer = new SimpleRenderer(symbol);
  layerDrawingOptions.renderer = renderer;
  ...
});

<Boolean> scaleSymbols

Determines if the layer renders the symbols based on scale. When false the layer does not render the symbols based on scale.
Known values: true | false

<Boolean> showLabels

Determines if labels are displayed. When false, labels for the layer are not displayed.
Known values: true | false

<Number> transparency

The transparency of the layer. Values range from 0 to 100 where 0 is opaque and 100 is 100% transparent.
Method Details

toJson()

Converts object to its ArcGIS Server JSON representation.
Return type: Object
Show Modal