| Package | com.esri.ags.layers |
| Class | public class ArcGISDynamicMapServiceLayer |
| Inheritance | ArcGISDynamicMapServiceLayer DynamicMapServiceLayer Layer mx.core.UIComponent |
| Implements | ILegendSupport |
Note that ArcGISDynamicMapServiceLayer, like all layers, extend UIComponent and thus include basic mouse events, for example: click, mouseOut, mouseOver, and mouseDown, as well as other events like show and hide, and general properties, such as alpha and visible.
MXML usage of ArcGISDynamicMapServiceLayer:
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer
url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer"/>
</esri:Map>
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer id="dynamicCensusBlockPoints"
url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer">
<esri:visibleLayers>
<s:ArrayCollection>
<fx:Number>0</fx:Number> <!-- Only show this specific layer -->
</s:ArrayCollection>
</esri:visibleLayers>
</esri:ArcGISDynamicMapServiceLayer>
</esri:Map>See also
| Property | Defined By | ||
|---|---|---|---|
| capabilities : Array [read-only]
Capabilities of the map service, possible array values are Map, Query, and Data. | ArcGISDynamicMapServiceLayer | ||
| copyright : String [read-only]
Map copyright as defined by the map service. | ArcGISDynamicMapServiceLayer | ||
| description : String [read-only]
Map description as defined by the map service. | ArcGISDynamicMapServiceLayer | ||
| disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from
being loaded from the browser's cache. | ArcGISDynamicMapServiceLayer | ||
| dpi : Number
The output dpi of the dynamic map service layer. | ArcGISDynamicMapServiceLayer | ||
| fullExtent : Extent [read-only]
Full extent as defined by the map service. | ArcGISDynamicMapServiceLayer | ||
| imageFormat : String
The output image type. | ArcGISDynamicMapServiceLayer | ||
| imageTransparency : Boolean
Whether or not the background of dynamic image is transparent. | ArcGISDynamicMapServiceLayer | ||
| initialExtent : Extent [override] [read-only]
Initial extent as defined by the map service. | ArcGISDynamicMapServiceLayer | ||
![]() | isInScaleRange : Boolean [read-only]
Returns true if the current scale of the map is between the maximum and minimum scale of the layer [added in version 1.3]. | Layer | |
| layerDefinitions : Array
Array of layer definition expressions that allows you to filter the features of individual layers in the exported map image. | ArcGISDynamicMapServiceLayer | ||
| layerInfos : Array [read-only]
The available layers in the map service and their default visibility. | ArcGISDynamicMapServiceLayer | ||
| layerInfoWindowRenderers : Array
Array of LayerInfoWindowRenderers that allow you to define infoWindowRenderers for specific layers [added in version 2.3]. | ArcGISDynamicMapServiceLayer | ||
| layerTimeOptions : Array
Array of LayerTimeOptions that allow you to override how a layer is exported in reference to the map's timeExtent [added in version 2.0]. | ArcGISDynamicMapServiceLayer | ||
![]() | loaded : Boolean [read-only]
When the layer is loaded, the value becomes "true" and layer properties can be accessed. | Layer | |
![]() | loadFault : Fault [read-only]
A reference to the fault that is dispatched when the layer throws a loadError event. | Layer | |
![]() | map : Map [read-only]
A reference to the Map this layer is in. | Layer | |
![]() | maxScale : Number
The maximum scale of the layer [added in version 1.3]. | Layer | |
![]() | minScale : Number
The minimum scale of the layer [added in version 1.3]. | Layer | |
| proxyURL : String
The URL to proxy the request through. | ArcGISDynamicMapServiceLayer | ||
| requestTimeout : int
The request timeout in seconds. | ArcGISDynamicMapServiceLayer | ||
| serviceDescription : String [read-only]
Map service description as defined by the map service. | ArcGISDynamicMapServiceLayer | ||
| spatialReference : SpatialReference [override] [read-only]
The spatial reference of the map service. | ArcGISDynamicMapServiceLayer | ||
| tableInfos : Array [read-only]
The stand-alone tables in the map service [added in version 2.0]. | ArcGISDynamicMapServiceLayer | ||
| timeInfo : TimeInfo [read-only]
Only the TimeInfo's timeExtent and timeReference properties may be available [added in version 2.0]. | ArcGISDynamicMapServiceLayer | ||
| timeOffset : Number
The time offset for the layer [added in version 2.0]. | ArcGISDynamicMapServiceLayer | ||
| timeOffsetUnits : String
The units of the timeOffset [added in version 2.0]. | ArcGISDynamicMapServiceLayer | ||
| token : String
Token for accessing a secure dynamic ArcGIS service. | ArcGISDynamicMapServiceLayer | ||
| units : String [override] [read-only]
The units of the layer. | ArcGISDynamicMapServiceLayer | ||
| url : String
URL endpoint of a service. | ArcGISDynamicMapServiceLayer | ||
| useMapTime : Boolean
If true and the map service is time aware, a new map image will be requested whenever the map's timeExtent changes. | ArcGISDynamicMapServiceLayer | ||
| version : Number [read-only]
The version of ArcGIS Server where the map service is published to, for example, 9.3, 9.31, 10, 10.01 or 10.1. | ArcGISDynamicMapServiceLayer | ||
| visibleLayers : ArrayCollection
Sets the visible layers of the exported map. | ArcGISDynamicMapServiceLayer | ||
| Method | Defined By | ||
|---|---|---|---|
ArcGISDynamicMapServiceLayer(url:String = null, proxyURL:String = null, token:String = null)
Creates a new ArcGISDynamicMapServiceLayer object. | ArcGISDynamicMapServiceLayer | ||
defaultVisibleLayers():void
Clears the visible layers as defined in visibleLayers and resets to the default layers of the map service. | ArcGISDynamicMapServiceLayer | ||
exportMapImage(imageParameters:ImageParameters = null, responder:IResponder = null):AsyncToken
Exports a map using values from the layer as defaults. | ArcGISDynamicMapServiceLayer | ||
getAllDetails(responder:IResponder = null):AsyncToken
Gets the detailed information for all the ArcGIS layers and tables in the service. | ArcGISDynamicMapServiceLayer | ||
getDetails(layerOrTableId:Number, responder:IResponder = null):AsyncToken
Gets the detailed information for an ArcGIS layer or table. | ArcGISDynamicMapServiceLayer | ||
getLegendInfos(responder:IResponder = null):AsyncToken
Gets legend infos. | ArcGISDynamicMapServiceLayer | ||
![]() | refresh():void
Causes the layer to redraw or reload its content. | Layer | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when getAllDetails, getDetails or exportMapImage operations fails. | ArcGISDynamicMapServiceLayer | |||
| Dispatched when an getAllDetails operation successfully completes. | ArcGISDynamicMapServiceLayer | |||
| Dispatched when an getDetails operation successfully completes. | ArcGISDynamicMapServiceLayer | |||
![]() | Fires if the value of isInScaleRange changes. | Layer | ||
![]() | Fires after layer properties for the layer are successfully populated. | Layer | ||
![]() | Fires if the layer is unable to load. | Layer | ||
| Dispatched when an exportMapImage operation successfully completes. | ArcGISDynamicMapServiceLayer | |||
![]() | Fires when the layer has finished updating its content. | Layer | ||
![]() | Fires when the layer begins to update its content. | Layer | ||
| capabilities | property |
capabilities:Array [read-only] Capabilities of the map service, possible array values are Map, Query, and Data.
This property can be used as the source for data binding.
public function get capabilities():Array| copyright | property |
copyright:String [read-only] Map copyright as defined by the map service.
This property can be used as the source for data binding.
public function get copyright():String| description | property |
description:String [read-only] Map description as defined by the map service.
This property can be used as the source for data binding.
public function get description():String| disableClientCaching | property |
disableClientCaching:BooleanIf true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
The default value is false.
This property can be used as the source for data binding.
public function get disableClientCaching():Boolean public function set disableClientCaching(value:Boolean):void| dpi | property |
dpi:NumberThe output dpi of the dynamic map service layer.
The default value is 96.
This property can be used as the source for data binding.
public function get dpi():Number public function set dpi(value:Number):void| fullExtent | property |
fullExtent:Extent [read-only] Full extent as defined by the map service.
This property can be used as the source for data binding.
public function get fullExtent():Extent| imageFormat | property |
imageFormat:StringThe output image type. Valid types are: png8 | png24 | png32 | jpg | gif. Only png and gif formats support transparency.
The default value is png8.
This property can be used as the source for data binding.
public function get imageFormat():String public function set imageFormat(value:String):void| imageTransparency | property |
imageTransparency:BooleanWhether or not the background of dynamic image is transparent. Only png and gif formats support transparency.
The default value is true.
This property can be used as the source for data binding.
public function get imageTransparency():Boolean public function set imageTransparency(value:Boolean):voidSee also
| initialExtent | property |
initialExtent:Extent [read-only] [override] Initial extent as defined by the map service. Used by the map if it is the first layer in the map and map doesn't have an extent specified.
This property can be used as the source for data binding.
public function get initialExtent():Extent| layerDefinitions | property |
layerDefinitions:ArrayArray of layer definition expressions that allows you to filter the features of individual layers in the exported map image. Definition expressions for layers that are currently not visible will be ignored by the server.
This property can be used as the source for data binding.
public function get layerDefinitions():Array public function set layerDefinitions(value:Array):voidSee also
myDynamicLayer.layerDefinitions = [
"STATE_FIPS = '08'",
"STATE_FIPS = '08'",
null, // just the group layer
"STATE_FIPS = '08'",
"STATE_FIPS = '08'",
"STATE_FIPS = '08'",
];| layerInfos | property |
layerInfos:Array [read-only] The available layers in the map service and their default visibility.
This property can be used as the source for data binding.
public function get layerInfos():ArraySee also
| layerInfoWindowRenderers | property |
layerInfoWindowRenderers:Array| Since : | ArcGIS API for Flex 2.3 |
Array of LayerInfoWindowRenderers that allow you to define infoWindowRenderers for specific layers [added in version 2.3].
This property can be used as the source for data binding.
public function get layerInfoWindowRenderers():Array public function set layerInfoWindowRenderers(value:Array):voidSee also
| layerTimeOptions | property |
layerTimeOptions:ArrayArray of LayerTimeOptions that allow you to override how a layer is exported in reference to the map's timeExtent [added in version 2.0].
This property can be used as the source for data binding.
public function get layerTimeOptions():Array public function set layerTimeOptions(value:Array):voidSee also
| proxyURL | property |
proxyURL:StringThe URL to proxy the request through.
This property can be used as the source for data binding.
public function get proxyURL():String public function set proxyURL(value:String):void| requestTimeout | property |
requestTimeout:intThe request timeout in seconds. A value less than or equal to zero prevents request timeout.
The default value is -1.
This property can be used as the source for data binding.
public function get requestTimeout():int public function set requestTimeout(value:int):void| serviceDescription | property |
serviceDescription:String [read-only] Map service description as defined by the map service.
This property can be used as the source for data binding.
public function get serviceDescription():String| spatialReference | property |
spatialReference:SpatialReference [read-only] [override] The spatial reference of the map service.
This property can be used as the source for data binding.
public function get spatialReference():SpatialReference| tableInfos | property |
tableInfos:Array [read-only] The stand-alone tables in the map service [added in version 2.0]. The TableInfo contains the id and name of each of these table.
This property can be used as the source for data binding.
public function get tableInfos():ArraySee also
| timeInfo | property |
timeInfo:TimeInfo [read-only] Only the TimeInfo's timeExtent and timeReference properties may be available [added in version 2.0].
This property can be used as the source for data binding.
public function get timeInfo():TimeInfo| timeOffset | property |
timeOffset:NumberThe time offset for the layer [added in version 2.0].
This property can be used as the source for data binding.
public function get timeOffset():Number public function set timeOffset(value:Number):void| timeOffsetUnits | property |
timeOffsetUnits:StringThe units of the timeOffset [added in version 2.0].
This property can be used as the source for data binding.
public function get timeOffsetUnits():String public function set timeOffsetUnits(value:String):voidSee also
| token | property |
token:StringToken for accessing a secure dynamic ArcGIS service.
This property can be used as the source for data binding.
public function get token():String public function set token(value:String):void
<esri:ArcGISDynamicMapServiceLayer
url="http://premium.example.com/ArcGIS/rest/services/SuperDuperMap/MapServer?token=TJd2xWZj_FAKE_1H0OHI2AtqXc91fXecait5yPUee-SbbmCbyC400_K5NVgUCz2q"
token="TJd2xWZj_FAKE_1H0OHI2AtqXc91fXecait5yPUee-SbbmCbyC400_K5NVgUCz2q" />
</esri:Map>| units | property |
units:String [read-only] [override] The units of the layer. Subclasses should override this method as a best practice in case a subclassed layer is added to a map which has different "units".
This property can be used as the source for data binding.
public function get units():StringSee also
| url | property |
url:StringURL endpoint of a service. To obtain the URL, use ArcGIS Services Directory. An example URL for a dynamic map service is http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer.
This property can be used as the source for data binding.
public function get url():String public function set url(value:String):void| useMapTime | property |
useMapTime:Boolean| Since : | ArcGIS API for Flex 2.2 |
If true and the map service is time aware, a new map image will be requested whenever the map's timeExtent changes.
The default value is true.
This property can be used as the source for data binding.
public function get useMapTime():Boolean public function set useMapTime(value:Boolean):void| version | property |
version:Number [read-only] | Since : | ArcGIS API for Flex 2.2 |
The version of ArcGIS Server where the map service is published to, for example, 9.3, 9.31, 10, 10.01 or 10.1.
This property can be used as the source for data binding.
public function get version():Number| visibleLayers | property |
visibleLayers:ArrayCollectionSets the visible layers of the exported map. By default, the visible layers are as defined by the default visibility in LayerInfo.
This property can be used as the source for data binding.
public function get visibleLayers():ArrayCollection public function set visibleLayers(value:ArrayCollection):voidSee also
| ArcGISDynamicMapServiceLayer | () | Constructor |
public function ArcGISDynamicMapServiceLayer(url:String = null, proxyURL:String = null, token:String = null)Creates a new ArcGISDynamicMapServiceLayer object.
Parametersurl:String (default = null) — URL to the ArcGIS Server REST resource that represents a map service.
| |
proxyURL:String (default = null) — The URL to proxy the request through.
| |
token:String (default = null) — Token for accessing a secure dynamic ArcGIS service.
|
| defaultVisibleLayers | () | method |
public function defaultVisibleLayers():voidClears the visible layers as defined in visibleLayers and resets to the default layers of the map service.
| exportMapImage | () | method |
public function exportMapImage(imageParameters:ImageParameters = null, responder:IResponder = null):AsyncTokenExports a map using values from the layer as defaults. On completion, MapImage is returned. The mapImageExport event is also fired.
Parameters
imageParameters:ImageParameters (default = null) — Input parameters to use when exporting the map image.
Non-null properties override the layer's values.
| |
responder:IResponder (default = null) — IResponder to pass the MapImage result to.
|
AsyncToken |
See also
| getAllDetails | () | method |
public function getAllDetails(responder:IResponder = null):AsyncToken| Since : | ArcGIS API for Flex 2.0 |
Gets the detailed information for all the ArcGIS layers and tables in the service. On completion, an AllDetails object is returned. This requires ArcGIS Server 10.0 or above.
Parameters
responder:IResponder (default = null) — IResponder to pass the AllDetails result to.
|
AsyncToken |
See also
| getDetails | () | method |
public function getDetails(layerOrTableId:Number, responder:IResponder = null):AsyncTokenGets the detailed information for an ArcGIS layer or table. On completion, a LayerDetails is returned if layerOrTableId is a layer, or a TableDetails is returned if layerOrTableId is a table.
Parameters
layerOrTableId:Number — Layer ID or Table ID assigned by ArcGIS Server for a layer or table.
| |
responder:IResponder (default = null) — IResponder to pass the LayerDetails or TableDetails result to.
|
AsyncToken |
See also
| getLegendInfos | () | method |
public function getLegendInfos(responder:IResponder = null):AsyncTokenGets legend infos.
Parameters
responder:IResponder (default = null) — The responder to call on result or fault.
The result function will be given an Array of LayerLegendInfo instances.
|
AsyncToken —
|
See also
| fault | Event |
mx.rpc.events.FaultEventmx.rpc.events.FaultEvent.FAULTDispatched when getAllDetails, getDetails or exportMapImage operations fails.
| getAllDetailsComplete | Event |
com.esri.ags.events.DetailsEventcom.esri.ags.events.DetailsEvent.GET_ALL_DETAILS_COMPLETEDispatched when an getAllDetails operation successfully completes.
Defines the value of thetype property of an getAllDetailsComplete event object.
| getDetailsComplete | Event |
com.esri.ags.events.DetailsEventcom.esri.ags.events.DetailsEvent.GET_DETAILS_COMPLETEDispatched when an getDetails operation successfully completes.
Defines the value of thetype property of an getDetailsComplete event object.
| mapImageExport | Event |
com.esri.ags.events.MapImageEventcom.esri.ags.events.MapImageEvent.EXPORTDispatched when an exportMapImage operation successfully completes.
Defines the value of thetype property of a mapImageExport event object.