Packagecom.esri.aws.awx.map.layers
Interfacepublic interface IStaticLayer extends ILayer, flash.events.IEventDispatcher

IStaticLayer is an interface that allows DisplayObjects to be added to the map. StaticLayer children will not be moved when the map is panned or zoomed. It can be used to add logo's or to show a splash screen.

See also

Live Sample - Static Layer - Flex API (Add your own logo to the map)


Public Properties
 PropertyDefined by
 Inheritedalpha : Number
The transparency value of the layer.
ILayer
 Inheritedicon : Class
The icon that represents this layer.
ILayer
 Inheritedid : String
The layer identifier.
ILayer
 Inheritedlabel : String
The label of the layer.
ILayer
 InheritedlayerStyle : IStyle
The style of the layer.
ILayer
 Inheritedmap : IMap
The reference to the parent map container.
ILayer
 Inheritedstyle : IStyle
DEPRECATED
ILayer
 InheritedsupportedProjections : Array
The array of supported projections for this groupLayer.
ILayer
 Inheritedvisible : Boolean
If true, the layer is visible.
ILayer
Public Methods
 MethodDefined by
  
addOverlayAbsolute(child:DisplayObject):void
addOverlayAbsolute adds a DisplayOject to the static layer using the absolute x and y positions assigned to the DisplayObject.
IStaticLayer
  
addOverlayRelative(child:UIComponent, horizontalAlignment:String, verticalAlignment:String, horizontalOffset:Number = 0, verticalOffset:Number = 0):void
addOverlayRelative adds a DisplayOject to the static layer using the relative parameters passed into the method.
IStaticLayer
  
getHeight():Number
Retrieves the height of the static layer.
IStaticLayer
 Inherited
getUIComponent():UIComponent
The layer's UIComponent.
ILayer
  
getWidth():Number
Retrieves the width of the static layer.
IStaticLayer
  
removeOverlay(child:DisplayObject):void
Removes the DisplayObject child from the static layer.
IStaticLayer
  
removeOverlayByName(name:String):void
Removes the DisplayObject child from the static layer based on its name.
IStaticLayer
Method detail
addOverlayAbsolute()method
public function addOverlayAbsolute(child:DisplayObject):void

addOverlayAbsolute adds a DisplayOject to the static layer using the absolute x and y positions assigned to the DisplayObject.

Parameters
child:DisplayObject

See also


Example
Display image at 25,25:
               var logo1:Image = new Image();
               logo1.load("http://www.arcwebservices.com/v2006/images/home/free_trial.gif");
               logo1.x = logo1.y = 25;
               map.staticLayer.addOverlayAbsolute(logo1);
         

addOverlayRelative()method 
public function addOverlayRelative(child:UIComponent, horizontalAlignment:String, verticalAlignment:String, horizontalOffset:Number = 0, verticalOffset:Number = 0):void

addOverlayRelative adds a DisplayOject to the static layer using the relative parameters passed into the method. This allows for constrained layout of static items.

Parameters
child:UIComponent — The UIComponent object being added to the static layer
 
horizontalAlignment:String — The string value of the horizontal alignment -- "left", "right", "center"
 
verticalAlignment:String — The string value of the vertical alignment -- "top", "bottom", "middle"
 
horizontalOffset:Number (default = 0) — The numerical value by which to offset the object from the horizontal alignment (i.e., 20 pixels from the left)
 
verticalOffset:Number (default = 0) — The numerical value by which to offset the object from the vertical alignment (i.e., 20 pixels from the top)

See also

getHeight()method 
public function getHeight():Number

Retrieves the height of the static layer.

Returns
Number — The height of the static layer.
getWidth()method 
public function getWidth():Number

Retrieves the width of the static layer.

Returns
Number — The width of the static layer.
removeOverlay()method 
public function removeOverlay(child:DisplayObject):void

Removes the DisplayObject child from the static layer.

Parameters
child:DisplayObject — The DisplayObject to be remove.

Example
Display image at 25 pixels from bottom right,:
               var logo2:Image = new Image();
               logo2.load("http://www.arcwebservices.com/v2006/images/home/free_trial.gif");
               map.staticLayer.addOverlayRelative(logo2, "right", "bottom", 25, 25);
         

removeOverlayByName()method 
public function removeOverlayByName(name:String):void

Removes the DisplayObject child from the static layer based on its name.

Parameters
name:String — the name of the DisplayObject.