| Package | com.esri.ags.layers |
| Class | public class ArcGISDynamicMapServiceLayer |
| Inheritance | ArcGISDynamicMapServiceLayer DynamicMapServiceLayer Layer mx.core.UIComponent |
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.
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"/>
</esri:Map>
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer id="dynamicCensusBlockPoints"
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer">
<esri:visibleLayers>
<mx:ArrayCollection>
<mx:Number>0</mx:Number> <!-- Show census block points only -->
</mx:ArrayCollection>
</esri:visibleLayers>
</esri:ArcGISDynamicMapServiceLayer>
</esri:Map>See also
| Property | Defined by | ||
|---|---|---|---|
| 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
[read-only]
Initial extent as defined by the map service.
| ArcGISDynamicMapServiceLayer | ||
![]() | isInScaleRange : Boolean
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 | ||
![]() | loaded : Boolean
When the layer is loaded, the value becomes "true" and layer properties can be accessed.
| Layer | |
![]() | map : Map
A reference to the Map this layer is in.
| Layer | |
![]() | maxScale : Number = 0
The maximum scale of the layer [added in version 1.3].
| Layer | |
![]() | minScale : Number = 0
The minimum scale of the layer [added in version 1.3].
| Layer | |
| proxyURL : String
The URL to proxy the request through.
| ArcGISDynamicMapServiceLayer | ||
| requestTimeout : Number = -1
The request timeout in seconds.
| ArcGISDynamicMapServiceLayer | ||
| serviceDescription : String [read-only]
Map service description as defined by the map service.
| ArcGISDynamicMapServiceLayer | ||
| spatialReference : SpatialReference
[read-only]
The spatial reference of the map service.
| ArcGISDynamicMapServiceLayer | ||
| token : String
Token for accessing a secure dynamic ArcGIS service.
| ArcGISDynamicMapServiceLayer | ||
| units : String [read-only]
The units of the layer.
| ArcGISDynamicMapServiceLayer | ||
| url : String
URL endpoint of a service.
| 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):void
Exports a map using values from the layer as defaults.
| ArcGISDynamicMapServiceLayer | ||
|
getLayerDetails(layerID:Number, responder:IResponder):void
Gets the detailed layer information for an ArcGIS layer.
| ArcGISDynamicMapServiceLayer | ||
![]() |
refresh():void
Causes the layer to redraw or reload its content.
| Layer | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
![]() | Dispatched when the download of the map image is complete. | DynamicMapServiceLayer | ||
![]() | Dispatched when an input/output error occurs when downloading the map image. | DynamicMapServiceLayer | ||
![]() | Fires after layer properties for the layer are successfully populated. | Layer | ||
![]() | Fires if the layer is unable to load. | Layer | ||
| Dispatched when the map export is completed. | ArcGISDynamicMapServiceLayer | |||
| 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.
Implementation 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.
Implementation public function get description():String
| disableClientCaching | property |
disableClientCaching:Boolean [read-write]If 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.
Implementation public function get disableClientCaching():Boolean
public function set disableClientCaching(value:Boolean):void
| dpi | property |
dpi:Number [read-write]The output dpi of the dynamic map service layer.
The default value is 96.
This property can be used as the source for data binding.
Implementation 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.
Implementation public function get fullExtent():Extent
| imageFormat | property |
imageFormat:String [read-write]The 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.
Implementation public function get imageFormat():String
public function set imageFormat(value:String):void
| imageTransparency | property |
imageTransparency:Boolean [read-write]Whether 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.
Implementation public function get imageTransparency():Boolean
public function set imageTransparency(value:Boolean):void
See also
| initialExtent | property |
initialExtent:Extent [read-only]Initial extent as defined by the map service. Used for the map if it's 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.
Implementation public function get initialExtent():Extent
| layerDefinitions | property |
layerDefinitions:Array [read-write]Array 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.
Implementation public function get layerDefinitions():Array
public function set layerDefinitions(value:Array):void
See also
| 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.
Implementation public function get layerInfos():Array
See also
| proxyURL | property |
proxyURL:String [read-write]The URL to proxy the request through.
This property can be used as the source for data binding.
Implementation public function get proxyURL():String
public function set proxyURL(value:String):void
| requestTimeout | property |
public var requestTimeout:Number = -1The request timeout in seconds. A value less than or equal to zero prevents request timeout.
| 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.
Implementation public function get serviceDescription():String
| spatialReference | property |
spatialReference:SpatialReference [read-only]The spatial reference of the map service.
This property can be used as the source for data binding.
Implementation public function get spatialReference():SpatialReference
| token | property |
public var token:StringToken for accessing a secure dynamic ArcGIS service.
| units | property |
units:String [read-only]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.
Implementation public function get units():String
See also
| url | property |
url:String [read-write]URL endpoint of a service. To obtain the URL, use ArcGIS Services Directory. An example URL for a dynamic map service is http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer.
This property can be used as the source for data binding.
Implementation public function get url():String
public function set url(value:String):void
| visibleLayers | property |
visibleLayers:ArrayCollection [read-write]Sets 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.
Implementation public function get visibleLayers():ArrayCollection
public function set visibleLayers(value:ArrayCollection):void
See 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):voidExports a map using values from the layer as defaults. On completion, MapImage is returned. The mapImageExport event is also fired.
ParametersimageParameters: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.
|
See also
| getLayerDetails | () | method |
public function getLayerDetails(layerID:Number, responder:IResponder):voidGets the detailed layer information for an ArcGIS layer. On completion, LayerDetails is returned.
ParameterslayerID:Number — Layer ID assigned by ArcGIS Server for a layer.
|
|
responder:IResponder — IResponder to pass the LayerDetails result to.
|
See also
| mapImageExport | event |
com.esri.ags.events.MapImageEvent
com.esri.ags.events.MapImageEvent.EXPORT
Dispatched when the map export is completed.
Defines the value of the type property of a mapImageExport event object.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Example - ArcGIS API for Flex connecting to a dynamic AGS service">
<esri:Map>
<esri:ArcGISDynamicMapServiceLayer
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"/>
</esri:Map>
</mx:Application>