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 is a string object.
Extends
nokia.maps.map.component.Component.
new nokia.maps.map.component.InfoBubbles
([props])
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.
Direct Inheritance
Inherited from nokia.maps.map.component.Component:
attach
destroy
detach
getId
getVersion
queryReference
releaseReference
mapDisplay
Indirect Inheritance
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:
| {String} | content | The content to be shown in the info bubble; it can be an HTML string, 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. |
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 |
| {String} | content | The content to be shown in the info bubble provided as an HTML string; 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 object containing the geographic coordinates of the location, where the anchor is to be placed |
Field Detail
readonly
String
ALIGNMENT_ABOVE
This identifier specifies a vertical alignment above the bubble's anchor.
readonly
String
ALIGNMENT_AUTO
This identifier specifies a horizontal or vertical alignment which is automatically determined.
readonly
String
ALIGNMENT_BELOW
This identifier specifies a vertical alignment below the bubble's anchor.
readonly
String
ALIGNMENT_LEFT
This identifier specifies a horizontal alignment to the left of the bubble's anchor.
readonly
String
ALIGNMENT_RIGHT
This identifier specifies a horizontal alignment to the right of the bubble's anchor.
readonly
String
DIMENSION_AUTO
This identifier specifies a width or height which is automatically determined.
readonly
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.
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.
Use nokia.maps.util.OObject.set() to set properties on this object
to make sure changes are propagated correctly to the system.
