geoObject.Balloon
Extends IBalloonManager.
Geo object balloon manager. Allows a geo object to manage a balloon by opening it and hiding it. Passes data to the balloon in the IGeoObjectPopupData. Uses the map balloon manager map.Balloon internally. Geo objects contain an instance of this class, which is available as myGeoObject.balloon. Don't create new instances of this class unless necessary.
Constructor | Fields | Events | Methods
Constructor
geoObject.Balloon(geoObject)
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object Geo object. |
* Mandatory parameter/option.
Fields
Name |
Type |
Description |
Event manager. Inherited from IEventEmitter. |
Events
Name |
Description |
Start of automatic shifting of the map center initiated by the autoPan method. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from IBalloonManager. |
|
End of automatic shifting of the map center initiated by the autoPan method. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from IBalloonManager. |
|
The event which precedes Balloon.event:userclose. Allows you to cancel the user's action by calling the preventDefault method. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from IBalloonManager. |
|
Closing the info object. Names of fields available via Event.get:
Inherited from IPopupManager. |
|
Opening the info object. Names of fields available via Event.get:
Inherited from IPopupManager. |
|
Balloon closed by the user. Instance of the Event class. Names of fields that are available via the Event.get method:
Inherited from IBalloonManager. |
Methods
Name |
Returns |
Description |
autoPan() |
Moves the map so that the balloon is visible. Inherited from IBalloonManager. |
|
Closes the info object. Inherited from IPopupManager. |
||
destroy() |
Disables the info object manager. Inherited from IPopupManager. |
|
getData() |
Object|null |
Returns the data of the info object or 'null'. Inherited from IPopupManager. |
IOptionManager|null |
Returns the options manager or 'null'. Inherited from IPopupManager. |
|
Returns the promise object to return the overlay. Inherited from IPopupManager. |
||
IOverlay|null |
Returns the overlay, if one exists. Inherited from IPopupManager. |
|
Number[]|null |
Returns the coordinates of the info object or 'null'. Inherited from IPopupManager. |
|
isOpen() |
Boolean |
Returns the info object state: open/closed. Inherited from IPopupManager. |
Opens the balloon for the geo object. |
||
Sets new user data. |
||
Defines new options for the info object. Inherited from IPopupManager. |
||
Specifies a new position for the info object. Inherited from IPopupManager. |
Methods details
open
{vow.Promise} open([position[, data[, options]]])
Opens the balloon for the geo object.
Returns Promise object.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[] Coordinates of the point where the hint is opened. By default: the point on the geoobject that is closest to the current center of the map. The projection of the coordinates can be specified in the options, otherwise the geo object projection is used. |
|
— |
Type: Object Data to add to the userData field for the object of data passed to the balloon. |
|
— |
Type: Object Options. |
setData
{vow.Promise} setData([data])
Sets new user data.
Returns Promise object.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Object Data to add to the userData field for the object of data passed to the balloon. |
Mandatory parameter/option.