Nokia Maps API Reference

Contents

Class nokia.maps.map.component.InfoBubbles

Class Summary

If added to the map, this component manages info bubbles. The component is responsible for adding and removing info bubbles. Each info bubble must have an instance of nokia.maps.geo.Coordinate and its contents can be either a string or a nokia.maps.search.Location object.

Bubble This interface defines a bubble which is shown on the map by an instance of nokia.maps.map.component.InfoBubbles.
Options This interface defines the properties (options or keys) for nokia.maps.map.component.InfoBubbles.
Method Summary
addBubble (content, coordinate) : nokia.maps.map.component.InfoBubbles.Bubble This method adds a new info bubble to the map and shows it.
addObserver (key, callback, [context]) : nokia.maps.util.OObject This method registers an observer for the property named by the caller.
attach (mapDisplay) This method is a callback invoked when the component is attached to a map.
bubbleExists (hBubble) : boolean This method checks whether a (previously opened) bubble (still) exists.
destroy () This method is called from Display when Display is destroyed.
detach (mapDisplay) This method is a callback invoked when the component is detached from a map.
get (key) : Variant This method retrieves the value of the property with the name provided by the caller.
getId () : String This method retrieves the unique identifier of the component.
getVersion () : String This method retrieves the version of the component.
queryReference () : nokia.maps.map.component.Component This method incremements the component's reference count.
releaseReference () : Number This method release a reference to the given component by decrementing the reference count.
remove (key) : nokia.maps.util.OObject This method removes the property with the name provided by the caller.
removeBubble (hBubble) This method closes (removes) an info bubble which is (or is not) currently shown on the map.
removeObserver (key, callback, context) : nokia.maps.util.OObject This method removes the observer for the property named by the caller.
set (nameOrObject, [value, [force]]) : nokia.maps.util.OObject This method sets property values, using the property names and values supplied by the caller.
updateBubble (hBubble, content, [coordinate]) This method updates the content of an info bubble which is currently shown on the map.
Field Summary
String ALIGNMENT_ABOVE This identifier specifies a vertical alignment above the bubble's anchor.
String ALIGNMENT_AUTO This identifier specifies a horizontal or vertical alignment which is automatically determined.
String ALIGNMENT_BELOW This identifier specifies a vertical alignment below the bubble's anchor.
String ALIGNMENT_LEFT This identifier specifies a horizontal alignment to the left of the bubble's anchor.
String ALIGNMENT_RIGHT This identifier specifies a horizontal alignment to the right of the bubble's anchor.
String DIMENSION_AUTO This identifier specifies a width or height which is automatically determined.
nokia.maps.map.Display mapDisplay This property holds a reference to the map.Display instance to which the given component belongs.
nokia.maps.util.OList openBubbleHandles This property holds an observable list of handles to open bubbles.
static nokia.maps.map.component.InfoBubbles.Options options This property holds an observable object that allows for modification of the presentation options on all bubbles that are displayed via the given component.
Constructor Detail

This method initializes an instance of nokia.maps.map.component.InfoBubbles which can be added to a map Display.

new nokia.maps.map.component.InfoBubbles([props])
Parameters:
{Object} [props]: an object which can contain the initial properties of an instance of this class. It can be used to extend a component.
Method Detail
addBubble (content, coordinate) : nokia.maps.map.component.InfoBubbles.Bubble
This method adds a new info bubble to the map and shows it. The method returns a handle to the bubble, which can later be used to close the bubble (remove it from the map) or update its content.

Note that if the user closes the bubble, it ceases to exist and the handle to it becomes invalid, therefore the bubble can no longer be accessed.

Parameters:
{nokia.maps.search.Location | String} content The content to be shown in the info bubble; it can be an HTML string or an instance of nokia.maps.search.Location returned by a search manager, but please note that Flash content in the bubble overlap other elements in the document
{nokia.maps.geo.Coordinate} coordinate An object containing the geographic coordinates of the location, where the bubble's anchor is to be placed; note that this argument is optional if the argument content is of the type nokia.maps.search.Location; if coordinate is provided and content is of the type nokia.maps.search.Location, coordinate determines the anchor position
Returns:
{nokia.maps.map.component.InfoBubbles.Bubble} The handle of this bubble
bubbleExists (hBubble) : boolean
This method checks whether a (previously opened) bubble (still) exists.
Parameters:
{nokia.maps.map.component.InfoBubbles.Bubble} hBubble A handle to the bubble
Returns:
{boolean} A flag indicating whether the bubble with the given handle (still) exists and is accessible
removeBubble (hBubble)
This method closes (removes) an info bubble which is (or is not) currently shown on the map.
Parameters:
{nokia.maps.map.component.InfoBubbles.Bubble} hBubble A handle to the bubble
updateBubble (hBubble, content, [coordinate])
This method updates the content of an info bubble which is currently shown on the map. If the info bubble is already closed (does not exist on the map) the given content data are not shown.
Parameters:
{nokia.maps.map.component.InfoBubbles.Bubble} hBubble A handle to the info bubble
{nokia.maps.search.Location | String} content The content to be shown in the info bubble provided either as an HTML string or an instance of nokia.maps.search.Location returned by a search manager; note that flash content in the bubble can lead to the effect that the flash content overlaps other elements in the document
{nokia.maps.geo.Coordinate} [coordinate]: An optional object containing the geographic coordinates of the location, where the anchor is to be placed; note that this argument is optional only if the argument content is of type nokia.maps.search.Location; if coordinate is provided and content is of type nokia.maps.search.Location, the value of coordinate determines the anchor position
Field Detail
String ALIGNMENT_ABOVE
This identifier specifies a vertical alignment above the bubble's anchor.
String ALIGNMENT_AUTO
This identifier specifies a horizontal or vertical alignment which is automatically determined.
String ALIGNMENT_BELOW
This identifier specifies a vertical alignment below the bubble's anchor.
String ALIGNMENT_LEFT
This identifier specifies a horizontal alignment to the left of the bubble's anchor.
String ALIGNMENT_RIGHT
This identifier specifies a horizontal alignment to the right of the bubble's anchor.
String DIMENSION_AUTO
This identifier specifies a width or height which is automatically determined.
nokia.maps.util.OList openBubbleHandles
This property holds an observable list of handles to open bubbles. When a bubble is shown, the respective handle is added to this list. When a bubble is closed, its handle is removed from this list.
This property holds an observable object that allows for modification of the presentation options on all bubbles that are displayed via the given component.

Use nokia.maps.util.OObject.set() to set properties on this object to make sure changes are propagated correctly to the system.

Documentation generated on Thu Feb 09 2012 12:59:03 GMT+0100 (CET).