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 id'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"/>

MXML to set specific visible layers:
 <esri:Map>
     <esri:ArcIMSMapServiceLayer
         serviceHost="http://www.geographynetwork.com" serviceName="ESRI_World">
         <mx:ArrayCollection>
             <esri:visibleLayers>
                 <mx:String>Oceans and Seas</mx:String>
                 <mx:String>Countries and Regions</mx:String>
             </esri:visibleLayers>
         </mx:ArrayCollection>
     </esri:ArcIMSMapServiceLayer>
 </esri:Map>

See also

com.esri.ags.events.LayerEvent
Find more ArcIMS services on Geography Network
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
[read-only] Initial extent as defined by the map service.
ArcIMSMapServiceLayer
 InheritedisInScaleRange : 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
  layerInfos : Array
[read-only] The available layers in the map service and their default visibility.
ArcIMSMapServiceLayer
 Inheritedloaded : Boolean
When the layer is loaded, the value becomes "true" and layer properties can be accessed.
Layer
 Inheritedmap : Map
A reference to the Map this layer is in.
Layer
 InheritedmaxScale : Number = 0
The maximum scale of the layer [added in version 1.3].
Layer
 InheritedminScale : Number = 0
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
[read-only] The spatial reference of the map service.
ArcIMSMapServiceLayer
  units : String
[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
updateLayer():void
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
 EventSummaryDefined by
 Inherited Dispatched when the download of the map image is complete.DynamicMapServiceLayer
 Inherited Dispatched when an input/output error occurs when downloading the map image.DynamicMapServiceLayer
 Inherited Fires after layer properties for the layer are successfully populated.Layer
 Inherited Fires if the layer is unable to load.Layer
Property detail
backgroundColorproperty
backgroundColor:String  [read-write]

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

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

This property can be used as the source for data binding.

Implementation
    public function get backgroundColor():String
    public function set backgroundColor(value:String):void
backgroundTranscolorproperty 
backgroundTranscolor:String  [read-write]

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

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

This property can be used as the source for data binding.

Implementation
    public function get backgroundTranscolor():String
    public function set backgroundTranscolor(value:String):void
imageFormatproperty 
imageFormat:String  [read-write]

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

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
initialExtentproperty 
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
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  [read-write]

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

This property can be used as the source for data binding.

Implementation
    public function get password():String
    public function set password(value:String):void
proxyURLproperty 
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
requestTimeoutproperty 
requestTimeout:int  [read-write]

The 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.

Implementation
    public function get requestTimeout():int
    public function set requestTimeout(value:int):void
serviceHostproperty 
serviceHost:String  [read-write]

The base URL for the ArcIMS server.

This property can be used as the source for data binding.

Implementation
    public function get serviceHost():String
    public function set serviceHost(value:String):void
serviceNameproperty 
serviceName:String  [read-write]

The service name of the ArcIMS service to be called.

This property can be used as the source for data binding.

Implementation
    public function get serviceName():String
    public function set serviceName(value:String):void
spatialReferenceproperty 
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
unitsproperty 
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

usernameproperty 
username:String  [read-write]

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

This property can be used as the source for data binding.

Implementation
    public function get username():String
    public function set username(value:String):void
visibleLayersproperty 
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

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.