com.esri.core.internal.value
Class DynamicLayerInfo

java.lang.Object
  extended by com.esri.core.internal.value.LayerInfo
      extended by com.esri.core.internal.value.DynamicLayerInfo
All Implemented Interfaces:
LayerInfoItem

public class DynamicLayerInfo
extends LayerInfo

This class represents a single sublayer in a dynamic map service and allows the user to set a new renderer and a new data source for the sublayer.


Constructor Summary
DynamicLayerInfo(int layerId)
          Instantiates a new dynamic layer info for the given layer id in a dynamic map service.
DynamicLayerInfo(int layerId, DrawingInfo drawingInfo)
          Instantiate a new dynamic layer info for the given layer id with the given drawing info.
DynamicLayerInfo(int layerId, DrawingInfo drawingInfo, LayerSource source)
          Instantiates a new dynamic layer info for the given layer id in a dynamic map service.
 
Method Summary
 DrawingInfo getDrawingInfo()
          Gets the drawing info.
 TimeOptions getLayerTimeOptions()
          Get the current layer time options.
 void resetToDefault()
          Use this method to reset this instance back to default values.
 void setDrawingInfo(DrawingInfo drawingInfo)
          Sets the drawing info.
 void setLayerTimeOptions(TimeOptions layerTimeOptions)
          Set the current layer time options.
protected  void toJson(org.codehaus.jackson.JsonGenerator node)
           
 
Methods inherited from class com.esri.core.internal.value.LayerInfo
getDefinitionExpression, getId, getLayerSource, setDefinitionExpression, setId, setLayerSource, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicLayerInfo

public DynamicLayerInfo(int layerId,
                        DrawingInfo drawingInfo,
                        LayerSource source)
Instantiates a new dynamic layer info for the given layer id in a dynamic map service. The given DrawingInfo will set the renderer used by the service to renderer the sublayer. The given LayerSource will be used to set a new data source for the sublayer.

Parameters:
layerId - the layer id this instance corresponds to
drawingInfo - the drawing info
source - the data source

DynamicLayerInfo

public DynamicLayerInfo(int layerId)
Instantiates a new dynamic layer info for the given layer id in a dynamic map service. This creates a default dynamic layer info that will use the service's renderer for the given layer and the layer's original data source. This constructor can be used with the DynamicLayerInfoCollection class to reorder layers in a dynamic map service without changing their renderer or data source.

Parameters:
layerId - the layer id this instance corresponds to

DynamicLayerInfo

public DynamicLayerInfo(int layerId,
                        DrawingInfo drawingInfo)
Instantiate a new dynamic layer info for the given layer id with the given drawing info. The dynamic layer info will use the layer's original data source.

Parameters:
layerId - sublayer to associate this dynamic layer info with
drawingInfo - drawing info for the layer
Method Detail

resetToDefault

public void resetToDefault()
Use this method to reset this instance back to default values. This will tell the service to use the default renderer for the layer and the layer's original data source.


getDrawingInfo

public DrawingInfo getDrawingInfo()
Gets the drawing info.

Returns:
the drawing info

setDrawingInfo

public void setDrawingInfo(DrawingInfo drawingInfo)
Sets the drawing info.

Parameters:
drawingInfo - the new drawing info

getLayerTimeOptions

public TimeOptions getLayerTimeOptions()
Get the current layer time options.

Returns:
layer time options

setLayerTimeOptions

public void setLayerTimeOptions(TimeOptions layerTimeOptions)
Set the current layer time options. Users can indicate whether or not the layer should use the time extent specified by the ArcGISDynamicMapServiceLayer TimeExtent property or not, whether to draw the layer features cumulatively or not and the time offsets for the layer.

Parameters:
layerTimeOptions -

toJson

protected void toJson(org.codehaus.jackson.JsonGenerator node)
               throws Exception
Overrides:
toJson in class LayerInfo
Throws:
IOException
Exception


Copyright © 2012. All Rights Reserved.