- Legend to Symbols

-
Class ovi.mapsapi.map.component.InfoBubbles
Class Summary
Adds the possibility to manage bubbles to the map. A bubble can be shown on the map by this component. A bubble must have a ovi.mapsapi.geo.Coordinate and content which can be either provided as a string or as a ovi.mapsapi.search.Location object.
Extends
ovi.mapsapi.ui.UIComponent.
new ovi.mapsapi.map.component.InfoBubbles
([props])
Bubble
Interface defining a bubble which will be shown on the map by ovi.mapsapi.map.component.InfoBubbles.
Options
Interface defining the info bubbles' options (keys)
Method Summary
addBubble
(content, coordinate)
: ovi.mapsapi.map.component.InfoBubbles.Bubble
Adds and shows a new Bubble on the map.
addListener
(type, listener, useCapture)
: Object
Registers an event listener, depending on the useCapture parameter, on the capture phase of the event flow or its target and bubbling phases.
addListenerNS
(namespaceURI, type, listener, useCapture)
: ovi.mapsapi.dom.EventTarget
Registers an event listener, depending on the useCapture parameter, on the capture phase of the event flow or its target and bubbling phases.
addObserver
(key, callback, [context])
: ovi.mapsapi.util.OObject
Register an observer for a property.
attach
(mapDisplay)
Callback method that is invoked when the component is attached to a map.
attach
(mapDisplay)
Will be called when this component gets added to a map display.
bubbleExists
(hBubble)
: boolean
Checks whether a (previous opened) bubble (still) exists.
build
()
Creates all DomElements and other entities which must created to generate a visual appearance.
collapse
()
Shortcut function for set("expanded", false).
detach
(mapDisplay)
Will be called when this component gets removed from a map display.
detach
(mapDisplay)
Callback method that is invoked when the component is detached from a map.
disableDrag
()
: ovi.mapsapi.dom.EventTarget
Disable the dragging of this event target, disallowing this event target to receive
dragstart, drag and dragend events.
disableUserSelect
()
: ovi.mapsapi.dom.EventTarget
Forbids the user to select text and elements within the event target and prevents the magnifier at the iPhone or other similar mobile devices.
dispatch
(evt)
: Boolean
Dispatches an event.
doc
()
: DomDocument
Returns the DomDocument instance this UI component MUST use for creating DomElements at run time.
enableDrag
()
: ovi.mapsapi.dom.EventTarget
Enable the dragging of this event target and disables the user selection, allowing this event target to receive
dragstart, drag and dragend events.
enableUserSelect
()
: ovi.mapsapi.dom.EventTarget
Allows the user to select text and elements within the event target and allows the magnifier at the iPhone or other similar mobile devices.
expand
()
Shortcut function for set("expanded", true).
expandedSetter
(expanded)
Will be called when this UI component's expansion state gets changed.
findElement
(cssClassName, [node])
Returns the first element within the component's root node, that has the passed css class assigned.
get
(key)
: Variant
Returns the value of the property with the given name.
getClippingNode
()
: DomElement
Returns the node containing all UI component's dom elements which get clipped automatically.
getId
()
: String
Returns a unique identifier of the component.
getRootNode
()
: DomElement
Returns the node containing all UI component's dom elements.
getSize
([node])
: Object
Returns the height and width of a given node or, by default, the UIComponent system's root node.
getVersion
()
: String
Returns the version of the component.
hide
()
Shortcut function for set("hidden", true).
hitTest
(pageX, pageY)
: Boolean
Tests if the given x/y position relative to the document lies within the outer bounding box of this node.
insertListener
(type, listener, useCapture)
: Object
Registers an event listener as first listener in the listener chain, depending on the useCapture parameter, on the capture phase of the event flow or its target and bubbling phases.
insertListenerNS
(namespaceURI, type, listener, useCapture)
: ovi.mapsapi.dom.EventTarget
Registers an event listener as first listener in the listener chain, depending on the useCapture parameter, on the capture phase of the event flow or its target and bubbling phases.
queryReference
()
: ovi.mapsapi.map.component.Component
Queries a new reference to this component.
releaseReference
()
: Number
Release a reference to this component and return the new updated reference count.
remove
(key)
: ovi.mapsapi.util.OObject
Removes the property with the given name.
removeBubble
(hBubble)
Closes (removes) a bubble which is (or is not) currently shown on the map.
removeListener
(type, listener, useCapture)
: ovi.mapsapi.dom.EventTarget
Removes an event listener.
removeListenerNS
(namespaceURI, type, listener, useCapture)
: ovi.mapsapi.dom.EventTarget
Removes an event listener.
removeObserver
(key, callback, context)
: ovi.mapsapi.util.OObject
Remove an observer from a key.
set
(nameOrObject, [value, [force]])
: ovi.mapsapi.util.OObject
Set the value(s) of a property or properties of given name(s) to given value(s).
show
()
Shortcut function for set("hidden", false).
updateBubble
(hBubble, content, [coordinate])
Updates the content of a bubble which is currently shown on the map.
Field Summary
String
ALIGNMENT_ABOVE
Specifies a vertical alignment above the bubble's anchor
String
ALIGNMENT_AUTO
Specifies a horizontal or vertical alignment which is automatically determined
String
ALIGNMENT_BELOW
Specifies a vertical alignment below the bubble's anchor
String
ALIGNMENT_LEFT
Specifies a horizontal alignment to the left of the bubble's anchor
String
ALIGNMENT_RIGHT
Specifies a horizontal alignment to the right of the bubble's anchor
String
DIMENSION_AUTO
Specifies a width or height which is automatically determined
Boolean
draggable
True if this event target is draggable and may receive a
dragstart, drag and dragend events; false otherwise.
Object
eventListener
Either undefined or a hashtable that contains for every event type an array with the values: (listener, useCapture, namespaceURI)(, listener, useCapture, namespaceURI)(,…)
Boolean
expanded
Indicates whether this component is in an expanded state
Boolean
hidden
Indicates whether this component is hidden
Boolean
isEventTarget
A property to indicate that an object implements the ovi.mapsapi.dom.EventTarget interface.
ovi.mapsapi.map.Display
mapDisplay
A reference to the map to which this component belongs.
ovi.mapsapi.util.OList
openBubbleHandles
An observable list of open bubbles.
static
ovi.mapsapi.map.component.InfoBubbles.Options
options
An observable object allowing to modify presentation options on all bubbles that are displayed via this component.
ovi.mapsapi.dom.EventTarget
parentNode
If this property is set, it shall refer to the parent event target.
Object
parentNodes
If this property is set, it shall be a hash table that contains as key the "namespaceURI" for which the assigned value is the parent event target.
Direct Inheritance
Inherited from ovi.mapsapi.ui.UIComponent:
attach
build
collapse
detach
doc
expand
expandedSetter
findElement
getClippingNode
getRootNode
getSize
hide
show
expanded
hidden
Indirect Inheritance
Inherited from ovi.mapsapi.map.component.Component:
attach
detach
getId
getVersion
queryReference
releaseReference
mapDisplay
Constructor Detail
Creates an InfoBubble component which can be added to a map display to enrich it with the functionality to show bubbles.
new ovi.mapsapi.map.component.InfoBubbles([props])
Parameters:
| {Object} | [props]: | an object which can contain properties / methods which should be appended to instances of this class. It can be used to extend a component. |
Method Detail
addBubble
(content, coordinate)
: ovi.mapsapi.map.component.InfoBubbles.Bubble
Adds and shows a new Bubble on the map.
This method returns a handle for the bubble,
which can be used to close it (remove it from the map) or update its content.
Parameters:
| {ovi.mapsapi.search.Location | String} | content | The content which should be shown in the info bubble. That could be either an html string or an instance of ovi.mapsapi.search.Location which was returned by a search manager. Note: Using flash content in the bubble can lead to the effect that the flash content overlaps other elements in the document. |
| {ovi.mapsapi.geo.Coordinate} | coordinate | The coordinate of where the bubbles anchor should be placed. Note: This parameter is optional if the first parameter is of type ovi.mapsapi.search.Location. If the coordinate is set although the first parameter is of type ovi.mapsapi.search.Location, the given coordinate will be used as anchor instead of the displayPosition attribute of the given Location. Note: If the user closed the bubble it does not exist anymore and the handle will be invalid, so there will be no way to access this bubble afterwards. |
Returns:
| {ovi.mapsapi.map.component.InfoBubbles.Bubble} | The handle of this bubble |
bubbleExists
(hBubble)
: boolean
Checks whether a (previous opened) bubble (still) exists.
Parameters:
| {ovi.mapsapi.map.component.InfoBubbles.Bubble} | hBubble | A handle of a bubble |
Returns:
| {boolean} | Whether the bubble with the given handle (still) exists and is accessible. |
removeBubble
(hBubble)
Closes (removes) a bubble which is (or is not) currently shown on the map.
Note: If the bubble was closed by the user it will be removed from the map.
Parameters:
| {ovi.mapsapi.map.component.InfoBubbles.Bubble} | hBubble | A handle of a bubble |
updateBubble
(hBubble, content, [coordinate])
Updates the content of a bubble which is currently shown on the map.
Note: If the bubble is already closed (doesn't exist at the map) the given content data will not be
shown.
Parameters:
| {ovi.mapsapi.map.component.InfoBubbles.Bubble} | hBubble | A handle of a bubble |
| {ovi.mapsapi.search.Location | String} | content | The content which should be shown in the info bubble. That could be either an html string or an instance of ovi.mapsapi.search.Location which was returned by a search manager. Note: Using flash content in the bubble can lead to the effect that the flash content overlaps other elements in the document. |
| {ovi.mapsapi.geo.Coordinate} | [coordinate]: | The coordinate of where the bubbles anchor should be placed. Note: This parameter is optional ONLY IF the second parameter is of type ovi.mapsapi.search.Location. If this parameter is set, although the second parameter is of type ovi.mapsapi.search.Location, this value will be used as anchor instead of the displayPosition attribute of the given Location. |
Field Detail
String
ALIGNMENT_AUTO
Specifies a horizontal or vertical alignment which is automatically determined
ovi.mapsapi.util.OList
openBubbleHandles
An observable list of open bubbles. When a bubble
is shown the respective handle will be added to this list.
When a bubble is closed, it will be removed from this list.
static
ovi.mapsapi.map.component.InfoBubbles.Options
options
An observable object allowing to modify presentation options
on all bubbles that are displayed via this component.
Use the OObject's set method to set properties on this object to make sure changes are propagated properly to the system.
Use the OObject's set method to set properties on this object to make sure changes are propagated properly to the system.