Class: InfoWindowE-mail This Topic Printable Version Give Us Feedback

Description

An InfoWindow is an HTML popup. It often contains the attributes of a Graphic. The default behavior on a Graphic is to show the InfoWindow after a click on the Graphic. An InfoTemplate is required for this default behavior. In addition, the InfoWindow can be used to display custom content on the map.

Class hierarchy

esri.dijit.InfoWindow

Properties

Property Type Description
anchor String Placement of the InfoWindow with respect to the graphic. See the Constants table for values.
coords Point The anchor point of the InfoWindow in screen coordinates.
fixedAnchor String InfoWindow always show with the specified anchor. See the Constants table for values.
isShowing Boolean Determines whether the InfoWindow is currently shown on the map.

Constants

Constant Description
ANCHOR_LOWERLEFT InfoWindow is anchored to the lower left of the point.
ANCHOR_LOWERRIGHT InfoWindow is anchored to the lower right of the point.
ANCHOR_UPPERLEFT InfoWindow is anchored to the upper left of the point.
ANCHOR_UPPERRIGHT InfoWindow is anchored to the upper right of the point.

Methods

Method Return Value Description
hide() none Hides the InfoWindow.
move(point) none Moves the InfoWindow to the specified screen point.
resize(width, height) none Resizes the InfoWindow to the specified height and width in pixels.
setContent(stringOrDOMNode) InfoWindow Sets the content in the InfoWindow.
setFixedAnchor(anchor) none Sets the fixed location of the InfoWindow anchor. Valid values are listed in the Constants table.
setTitle(title) InfoWindow Sets the title for the InfoWindow.
show(point, anchor) none Shows the InfoWindow at the specified screen point and anchor. Valid values are listed in the Constants table.

Events

Event Description
onHide() Fires when an infoWindow is hidden.
onShow() Fires when an InfoWindow is visible.
Properties Detail

<String> anchor

Placement of the InfoWindow with respect to the graphic. See the Constants table for values.
Default value: ANCHOR_UPPERRIGHT

<Point> coords

The anchor point of the InfoWindow in screen coordinates.

<String> fixedAnchor

InfoWindow always show with the specified anchor. See the Constants table for values.

<Boolean> isShowing

Determines whether the InfoWindow is currently shown on the map.
Known values: true | false
Methods Detail

hide()

Hides the InfoWindow.
Return value: none
See also:
onHide  

move(point)

Moves the InfoWindow to the specified screen point.
Return value: none
Input Parameters:
<Point> point Required The new anchor point when moving the InfoWindow.

resize(width, height)

Resizes the InfoWindow to the specified height and width in pixels.
Return value: none
Input Parameters:
<Number> width Required The new width of the InfoWindow in pixels.
<Number> height Required The new height of the InfoWindow in pixels.

setContent(stringOrDOMNode)

Sets the content in the InfoWindow.
Return value: InfoWindow
Input Parameters:
<Object> stringOrDOMNode Required The content for the InfoWindow. Can be any valid HTML or DOM element.

setFixedAnchor(anchor)

Sets the fixed location of the InfoWindow anchor. Valid values are listed in the Constants table.
Return value: none
Input Parameters:
<String> anchor Required Fixed anchor that cannot be overriden by InfoWindow.show(). See Constants table for values.

setTitle(title)

Sets the title for the InfoWindow.
Return value: InfoWindow
Input Parameters:
<String> title Required The title for the InfoWindow. Can be any valid HTML.

show(point, anchor)

Shows the InfoWindow at the specified screen point and anchor. Valid values are listed in the Constants table.
Return value: none
Input Parameters:
<Point> point Required Location to place anchor.
<String> anchor Required Placement of the InfoWindow with respect to the graphic. See the Constants table for values.
See also:
onShow  

Events Detail

onHide()

Fires when an infoWindow is hidden.
See also:
hide  

onShow()

Fires when an InfoWindow is visible.
See also:
show