Packagecom.esri.ags.components.supportClasses
Classpublic class InfoWindow
InheritanceInfoWindow Inheritance InfoComponent Inheritance spark.components.supportClasses.SkinnableComponent

InfoWindow is used to display custom content on the map or the attributes of a graphic based on its infoWindowRenderer property. Note that the map can only have one info window. You can hide it, show it, change its content or location.

Note: Pop-ups can be moved [added in version 3.1] by dragging the top-most header portion of the dialog window. For more information on implementing your own movable info window content, see IInfoWindowDraggableContent.

Default infowindowrenderer Custom CSS infowindowrenderer Orange infowindow without close button Custom InfoWindow with image
Standard InfoWindow(see sample)Styled InfoWindow(see sample)Styled InfoWindow(see Concepts)    Custom InfoWindow(see sample)
Table 1: Examples of InfoWindows components.

See also

com.esri.ags.Map.infoWindow
Live sample - Using infoWindow on rollover
Live sample - Show Geoprocessing result in InfoWindow
Live sample - Show FeatureLayer feature in InfoWindow
Live sample - Show Locator result in InfoWindow
Live sample - Styling InfoWindow with CSS


Public Properties
 PropertyDefined By
 InheritedanchorX : Number
The anchor X location in pixels.
InfoComponent
 InheritedanchorY : Number
The anchor Y location in pixels.
InfoComponent
  closeButtonVisible : Boolean
Whether to display the close button in the upper right corner.
InfoWindow
  content : UIComponent
The info window content.
InfoWindow
  contentOwner : Object
The content owner.
InfoWindow
 Inheriteddata : Object
The associated data.
InfoComponent
 InheritedisMapPanning : Boolean
[read-only] Return boolean value indicating if the map is panning.
InfoComponent
  label : String
The label (or title) of the info window.
InfoWindow
  labelVisible : Boolean
Whether to display the label in the upper left corner.
InfoWindow
 Inheritedmap : Map
[read-only] Gets a reference to the Map instance.
InfoComponent
Public Methods
 MethodDefined By
  
hide():void
Hide the info window.
InfoWindow
  
show(mapPoint:MapPoint, stagePoint:Point = null):void
Shows the info window at a specific location.
InfoWindow
Events
 Event Summary Defined By
  Fires when an InfoWindow is closed.InfoWindow
  Fires after an info window content changeInfoWindow
  Fires when an InfoWindow is opened.InfoWindow
Styles
 Style Description Defined By
  
backgroundAlpha
Type: Number CSS Inheritance: no
Alpha of the background. The default value is 1.0.
InfoWindow
  
backgroundColor
Type: uint Format: Color CSS Inheritance: no
Color of the background. The default value is 0xFFFFFF (white) - was 0x999999 (grey) prior to version 3.0.
InfoWindow
  
borderAlpha
Type: Number CSS Inheritance: no
The alpha transparency of the border [added in version 1.3]. Possible values range from 0.0 (invisible, fully transparent) to 1.0 (opaque, fully visible). The default value is 1.0 (opaque, fully visible).
InfoWindow
  
borderColor
Type: uint Format: Color CSS Inheritance: no
The color of the border [added in version 1.3]. The default value is 0xAAAAAA (grey) - was 0x000000 (black) prior to version 3.0.
InfoWindow
  
borderThickness
Type: Number Format: Length CSS Inheritance: no
Thickness of the border [added in version 1.3], in pixels. The default value is 1 pixels (was 0 pixels prior to version 3.0).
InfoWindow
  
headerPaddingBottom
Type: Number CSS Inheritance: no
The value of the header bottom padding. Note: the InfoSymbol.headerPaddingBottom style was added in version 3.1 of the ArcGIS API for Flex. The default value is 1.
InfoWindow
  
headerPaddingLeft
Type: Number CSS Inheritance: no
The value of the header left padding. Note: the InfoSymbol.headerPaddingLeft style was added in version 3.1 of the ArcGIS API for Flex. The default value is 1.
InfoWindow
  
headerPaddingRight
Type: Number CSS Inheritance: no
The value of the header right padding. Note: the InfoSymbol.headerPaddingRight style was added in version 3.1 of the ArcGIS API for Flex. The default value is 1.
InfoWindow
  
headerPaddingTop
Type: Number CSS Inheritance: no
The value of the header top padding. Note: the InfoSymbol.headerPaddingTop style was added in version 3.1 of the ArcGIS API for Flex. The default value is 1.
InfoWindow
  
infoOffsetW
Type: Number Format: Length CSS Inheritance: no
Number of pixels of the tail base. The default value is 10 pixels.
InfoWindow
  
infoOffsetX
Type: Number Format: Length CSS Inheritance: no
Number of pixels in the horizontal direction to offset the info tail. The default value is 12 pixels.
InfoWindow
  
infoOffsetY
Type: Number Format: Length CSS Inheritance: no
Number of pixels in the vertical direction to offset the info tail. The default value is 12 pixels.
InfoWindow
  
infoPlacement
Type: String CSS Inheritance: no
The placement of the info container relative to its anchor point. Possible values are "upperRight", "lowerRight", "upperLeft", "lowerLeft", "left", "right", "top", "bottom", and "center". The default value is right.
InfoWindow
  
infoPlacementMode
Type: String CSS Inheritance: no
The placement mode of the info container relative to its anchor point. Possible values are "auto", "none". Use auto to reposition the info container so its content will be visible when partially off the map. Use none to not reposition the info container when partially off the map. The default value is auto.
InfoWindow
  
lowerLeftRadius
Type: Number Format: Length CSS Inheritance: no
Radius of the lower left corner. The default value is 5 pixels.
InfoWindow
  
lowerRightRadius
Type: Number Format: Length CSS Inheritance: no
Radius of the lower right corner. The default value is 5 pixels.
InfoWindow
  
paddingBottom
Type: Number Format: Length CSS Inheritance: no
Number of pixels between the bottom border and the bottom of the content area. The default value is 3 pixels.
InfoWindow
  
paddingLeft
Type: Number Format: Length CSS Inheritance: no
Number of pixels between the left border and the left of the content area. The default value is 3 pixels.
InfoWindow
  
paddingRight
Type: Number Format: Length CSS Inheritance: no
Number of pixels between the right border and the right of the content area. The default value is 3 pixels.
InfoWindow
  
paddingTop
Type: Number Format: Length CSS Inheritance: no
Number of pixels between the top border and the top of the content area. The default value is 3 pixels.
InfoWindow
  
shadowAlpha
Type: Number CSS Inheritance: no
The alpha transparency value for the shadow color. Possible values range from 0.0 (invisible, fully transparent) to 1.0 (opaque, fully visible). The default value is 0.0 (invisible, fully transparent).
InfoWindow
  
shadowAngle
Type: Number CSS Inheritance: no
The angle of the shadow. The default value is 45.0.
InfoWindow
  
shadowColor
Type: uint Format: Color CSS Inheritance: yes
The color of the shadow. The default value is 0x000000 (black).
InfoWindow
  
shadowDistance
Type: Number CSS Inheritance: no
The offset distance for the shadow, in pixels. The default value is 0.0 (no shadow).
InfoWindow
  
upperLeftRadius
Type: Number Format: Length CSS Inheritance: no
Radius of the upper left corner. The default value is 5 pixels.
InfoWindow
  
upperRightRadius
Type: Number Format: Length CSS Inheritance: no
Radius of the upper right corner. The default value is 5 pixels.
InfoWindow
  
verticalGap
Type: Number Format: Length CSS Inheritance: no
Number of pixels between the top area (with label and close button) and the info window content. The default value is 3 pixels.
InfoWindow
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
closeButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
Optional skin part to display a close button. By default, this will appear at the top right corner of the InfoWindow.
InfoWindow
  
containerGroup:spark.components.supportClasses.GroupBase
Required: false Part Type: Static
Required skin component that contains the optional header and content.
InfoWindow
 Inherited
contentGroup:spark.components.Group
Required: false Part Type: Static
Optional skin part to hold the info window content.
InfoComponent
  
headerGroup:spark.components.supportClasses.GroupBase
Required: false Part Type: Static
Optional skin part that contains the label/title and the close button of the InfoWindow. By default, this will appear at the top of the InfoWindow.
InfoWindow
  
labelText:spark.components.supportClasses.TextBase
Required: false Part Type: Static
Optional skin part to display the label/title of the InfoWindow. By default, this will appear at the top left corner of the InfoWindow.
InfoWindow
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
withHeader
Skin state where either the label or the close button are visible. InfoWindow
  
withoutHeader
Skin state where the label and the close button are not visible. InfoWindow
Property Detail
closeButtonVisibleproperty
closeButtonVisible:Boolean

Whether to display the close button in the upper right corner.

The default value is true.


Implementation
    public function get closeButtonVisible():Boolean
    public function set closeButtonVisible(value:Boolean):void
contentproperty 
content:UIComponent

The info window content. Developers can hide the header label and close button using the labelVisible and closeButtonVisible properties. A component in the content can hide the info window by making the content dispatch a CLOSE event.

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


Implementation
    public function get content():UIComponent
    public function set content(value:UIComponent):void
contentOwnerproperty 
public var contentOwner:Object

The content owner. Most of the time, the content owner is an instance of Graphic.

labelproperty 
label:String

Since : ArcGIS API for Flex 2.3

The label (or title) of the info window.

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


Implementation
    public function get label():String
    public function set label(value:String):void
labelVisibleproperty 
labelVisible:Boolean

Whether to display the label in the upper left corner. This label is can be styled using InfoWindowLabel

The default value is true.


Implementation
    public function get labelVisible():Boolean
    public function set labelVisible(value:Boolean):void

See also

Method Detail
hide()method
public function hide():void

Hide the info window.

show()method 
public function show(mapPoint:MapPoint, stagePoint:Point = null):void

Shows the info window at a specific location. This will dispatch an Event.OPEN event.

Parameters

mapPoint:MapPoint — The location of the info window in map coordinates.
 
stagePoint:Point (default = null) — [optional] The location of the info window in global stage coordinates [added in version 2.3].

See also

Event Detail
close Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CLOSE

Fires when an InfoWindow is closed.

contentChange Event  
Event Object Type: flash.events.Event
Event.type property = contentChange

Fires after an info window content change

open Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.OPEN

Fires when an InfoWindow is opened.