class dijits.identify.InfoWindowConnector
dojo.require("dijits.identify.InfoWindowConnector");
defined in dijits/identify/InfoWindowConnector.js
An instance of this class is used to manage a dom node in such a way that it behaves similar to an info-window on the map. The node will stay attached to a specific map coordinate even when the map is panned or zoomed. The node can also be detached from the map and moved around the web page so that the map area in uncluttered. Note that an InfoWindowConnector does not replace the InfoWindow that is accessible through the map object.
Class hierarchy
+--------------------+
¦ Object ¦
+--------------------+
Δ
|
|
+------------------------------------------+
¦ dijits.identify.InfoWindowConnector ¦
+------------------------------------------+
Constructor
| new dijits.identify.InfoWindowConnector( srcNodeRef ) | ||||||
|---|---|---|---|---|---|---|
|
Creates a new info-window connector to manage the given dom node. The node must have been absolutely positioned.
Parameters:
|
Methods
| Methods | Return Value | Description |
|---|---|---|
| attachToMap(map) | none | Attach the dom node managed by this connector to the given map control. Once attached, the dom node will behave like an info-window on the map. That is, when the node is displayed at a specific map coordinate (using the show method described below), it will stay that way while panning and zooming the map. |
| detachFromMap(handleId?) | none | Detach the dom node managed by this connector from the map control so that the user can move it freely within the web page. By default the user will be able to drag from anywhere within the dom node to move it. However, the optional handleId can be used to specify the unique id of a HTML element (within the dom node) that acts as a handle to move the dom node. |
| isAttached() | Boolean | Returns true if the dom node is currently attached to the map. Otherwise returns false. |
| show(mapPoint) | none | Shows the dom node at the given map coordinates. The map coordinates are ignored if the node is currently not attached to a map. |
| hide() | none | Hides the dom node if it is currently visible. |
| isVisible() | Boolean | Returns true if the dom node is currently visible. Otherwise returns false. |
| destroy() | none | Releases all resources used by the connector. This method should be called when an instance of this connector is no longer needed in your application. |
Events
| Event | Arguments | Description |
|---|---|---|
| onAttach | map | This event is fired after the dom node associated with the connector is attached to a map. |
| onDetach | map | This event is fired after the dom node associated with the connector is detached from a map. |
Usage
var iwconnector = new dijits.identify.InfoWindowConnector("my-html-node-id");
iwconnector.attachToMap(map);
iwconnector.show(map.extent.getCenter());