This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/ArcIMSMapServiceLayer.html.
Packagecom.esri.ags.layers
Classpublic class ArcIMSMapServiceLayer
InheritanceArcIMSMapServiceLayer Inheritance DynamicMapServiceLayer Inheritance Layer Inheritance mx.core.UIComponent

Allows you to add ArcIMS image services to your map.
    Requirements:
  1. crossdomain.xml file on the ArcIMS server.
  2. ArcIMS service need to contain FEATURECOORDSYS and FILTERCOORDSYS with id's or string's.

Note that ArcIMSMapServiceLayer, 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.

Example: MXML usage of ArcIMSMapServiceLayer:
 <esri:ArcIMSMapServiceLayer
     serviceHost="http://www.geographynetwork.com"
     serviceName="ESRI_Snow"/>
Example: MXML to set specific visible layers:
 <esri:Map>
     <esri:ArcIMSMapServiceLayer serviceHost="http://www.geographynetwork.com" serviceName="Census_TIGER2000">
         <esri:visibleLayers>
             <s:ArrayCollection>
                 <fx:String>U.S. States</fx:String>
                 <fx:String>Non-U.S. Land</fx:String>
                 <fx:String>Oceans and Seas</fx:String>
             </s:ArrayCollection>
         </esri:visibleLayers>
     </esri:ArcIMSMapServiceLayer>
 </esri:Map>

See also

com.esri.ags.events.LayerEvent
Live sample - ArcIMS
Live sample - ArcIMS Layers on/off


Public Properties
 PropertyDefined By
  backgroundColor : String
The background color in [0-255],[0-255],[0-255] string format.
ArcIMSMapServiceLayer
  backgroundTranscolor : String
The background transparent color in [0-255],[0-255],[0-255] string format.
ArcIMSMapServiceLayer
  imageFormat : String
The output image type.
ArcIMSMapServiceLayer
  initialExtent : Extent
[override] [read-only] Initial extent as defined by the map service.
ArcIMSMapServiceLayer
 InheritedisInScaleRange : 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
  layerInfos : Array
[read-only] The available layers in the map service and their default visibility.
ArcIMSMapServiceLayer
 Inheritedloaded : Boolean
[read-only] When the layer is loaded, the value becomes "true" and layer properties can be accessed.
Layer
 InheritedloadFault : Fault
[read-only] A reference to the fault that is dispatched when the layer throws a loadError event.
Layer
 Inheritedmap : Map
[read-only] A reference to the Map this layer is in.
Layer
 InheritedmaxScale : Number
The maximum scale of the layer [added in version 1.3].
Layer
 InheritedminScale : Number
The minimum scale of the layer [added in version 1.3].
Layer
  password : String
The password used to log in to the ArcIMS server.
ArcIMSMapServiceLayer
  proxyURL : String
The URL to proxy the request through.
ArcIMSMapServiceLayer
  requestTimeout : int
The request timeout in seconds.
ArcIMSMapServiceLayer
  serviceHost : String
The base URL for the ArcIMS server.
ArcIMSMapServiceLayer
  serviceName : String
The service name of the ArcIMS service to be called.
ArcIMSMapServiceLayer
  spatialReference : SpatialReference
[override] [read-only] The spatial reference of the map service.
ArcIMSMapServiceLayer
  units : String
[override] [read-only] The units of the layer.
ArcIMSMapServiceLayer
  username : String
The user name used to log in to the ArcIMS server.
ArcIMSMapServiceLayer
  visibleLayers : ArrayCollection
Sets the visible layers of the exported map.
ArcIMSMapServiceLayer
Public Methods
 MethodDefined By
  
ArcIMSMapServiceLayer(serviceHost:String = null, serviceName:String = null, proxyURL:String = null, username:String = null, password:String = null)
Creates a new ArcIMS layer.
ArcIMSMapServiceLayer
  
Clears the visible layers as defined in visibleLayers and resets to the default layers of the map service.
ArcIMSMapServiceLayer
 Inherited
refresh():void
Causes the layer to redraw or reload its content.
Layer
Protected Methods
 MethodDefined By
 Inherited
Adds listeners for ExtentEvent.EXTENT_CHANGE, ZoomEvent.ZOOM_START, ZoomEvent.ZOOM_UPDATE and ZoomEvent.ZOOM_END.
Layer
 Inherited
When an EXTENT_CHANGE event occurs, this calls invalidateLayer();
Layer
 Inherited
hideHandler(event:FlexEvent):void
When the layer is hidden (visible is set to false), this calls removeMapListeners().
Layer
 Inherited
Subclasses should call this whenever they would like to have updateLayer() called on them.
Layer
 Inherited
loadMapImage(loader:Loader):void
Subclasses must override this method.
DynamicMapServiceLayer
 Inherited
Removes all the layers children.
Layer
 Inherited
Removes the four event listeners added by addMapListeners();
Layer
 Inherited
setLoaded(value:Boolean):void
Subclasses must call this when they've loaded all their properties and are ready to load their content.
Layer
 Inherited
showHandler(event:FlexEvent):void
When the layer is shown (visible is set to true), this calls addMapListeners() and invalidateLayer().
Layer
 Inherited
toScreenX(mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Layer
 Inherited
toScreenY(mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Layer
 Inherited
Subclasses must override this method.
Layer
 Inherited
Finishes the zoom animation.
Layer
 Inherited
Prepares the zoom animation by taking a bitmap of the layer.
Layer
 Inherited
Redraws the bitmap of the layer.
Layer
Events
 Event Summary Defined By
 InheritedFires if the value of isInScaleRange changes.Layer
 InheritedFires after layer properties for the layer are successfully populated.Layer
 InheritedFires if the layer is unable to load.Layer
 InheritedFires when the layer has finished updating its content.Layer
 InheritedFires when the layer begins to update its content.Layer
Property Detail
backgroundColorproperty
backgroundColor:String

The background color in [0-255],[0-255],[0-255] string format.

The default value is 255,255,255 (white).


Implementation
    public function get backgroundColor():String
    public function set backgroundColor(value:String):void
backgroundTranscolorproperty 
backgroundTranscolor:String

The background transparent color in [0-255],[0-255],[0-255] string format.

The default value is 255,255,255 (white).


Implementation
    public function get backgroundTranscolor():String
    public function set backgroundTranscolor(value:String):void
imageFormatproperty 
imageFormat:String

The output image type. Valid types are: gif | jpg | png8 | png24.

The default value is png8.


Implementation
    public function get imageFormat():String
    public function set imageFormat(value:String):void
initialExtentproperty 
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.


Implementation
    public function get initialExtent():Extent
layerInfosproperty 
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

passwordproperty 
password:String

The password used to log in to the ArcIMS server. Only Basic authentication is supported.


Implementation
    public function get password():String
    public function set password(value:String):void
proxyURLproperty 
proxyURL:String

The URL to proxy the request through.


Implementation
    public function get proxyURL():String
    public function set proxyURL(value:String):void
requestTimeoutproperty 
requestTimeout:int

The request timeout in seconds. A value less than or equal to zero prevents request timeout.

The default value is -1.


Implementation
    public function get requestTimeout():int
    public function set requestTimeout(value:int):void
serviceHostproperty 
serviceHost:String

The base URL for the ArcIMS server.


Implementation
    public function get serviceHost():String
    public function set serviceHost(value:String):void
serviceNameproperty 
serviceName:String

The service name of the ArcIMS service to be called.


Implementation
    public function get serviceName():String
    public function set serviceName(value:String):void
spatialReferenceproperty 
spatialReference:SpatialReference  [read-only] [override]

The spatial reference of the map service.


Implementation
    public function get spatialReference():SpatialReference
unitsproperty 
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".


Implementation
    public function get units():String

See also

usernameproperty 
username:String

The user name used to log in to the ArcIMS server. Only Basic authentication is supported.


Implementation
    public function get username():String
    public function set username(value:String):void
visibleLayersproperty 
visibleLayers:ArrayCollection

Sets the visible layers of the exported map. By default, the visible layers are as defined by the default visibility in LayerInfo.


Implementation
    public function get visibleLayers():ArrayCollection
    public function set visibleLayers(value:ArrayCollection):void

See also

Constructor Detail
ArcIMSMapServiceLayer()Constructor
public function ArcIMSMapServiceLayer(serviceHost:String = null, serviceName:String = null, proxyURL:String = null, username:String = null, password:String = null)

Creates a new ArcIMS layer.

Parameters
serviceHost:String (default = null) — The base URL for the ArcIMS server.
 
serviceName:String (default = null) — The service name of the ArcIMS service to be called.
 
proxyURL:String (default = null) — The URL to proxy the request through.
 
username:String (default = null) — The user name used to log in to the ArcIMS server.
 
password:String (default = null) — The password used to log in to the ArcIMS server.
Method Detail
defaultVisibleLayers()method
public function defaultVisibleLayers():void

Clears the visible layers as defined in visibleLayers and resets to the default layers of the map service.