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
| 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
| 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
Events
| onHide()
|
Fires when an infoWindow is hidden. |
| onShow()
|
Fires when an InfoWindow is visible. |
Properties Detail
Placement of the InfoWindow with respect to the graphic. See the Constants table for values.
Default value: ANCHOR_UPPERRIGHT
The anchor point of the InfoWindow in screen coordinates.
InfoWindow always show with the specified anchor. See the Constants table for values.
Determines whether the InfoWindow is currently shown on the map.
Known values: true | false
Methods Detail
Hides the InfoWindow.
Return value: none
Moves the InfoWindow to the specified screen point.
Return value: none
Input Parameters:
|
<Point> point |
Required |
The new anchor point when moving the InfoWindow. |
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.
Input Parameters:
|
<Object> stringOrDOMNode |
Required |
The content for the InfoWindow. Can be any valid HTML or DOM element. |
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. |
Sets the title for the InfoWindow.
Input Parameters:
|
<String> title |
Required |
The title for the InfoWindow. Can be any valid HTML. |
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. |
Events Detail
Fires when an infoWindow is hidden.
Fires when an InfoWindow is visible.