Maps API for JavaScript Developer's Guide

H.ui.InfoBubble

Class Summary

Extends: H.ui.base.Element

This class represents an information bubble bound to a geo-position on the map.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

dispose ()

Disposes of this InfoBubble instance.

setPosition (position)

This method sets the geo-position of this info bubble.

getState () : {H.ui.InfoBubble.State}

This method returns this info bubbles current state.

setState (state)

This method sets the info bubble's state.

close ()

This method closes the info bubble (setting its state to CLOSED)

open ()

This method opens the info bubble (setting its state to OPEN)

getContentElement () : {?HTMLElement}

This method returns the bubble's content element.

setContent (content)

This methods sets the content of the info bubble. This can either be a string (applied as innerHTML) to the content element of this info bubble or a HTML node which is appended to the content element.

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

renderInternal (element, doc)

This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes.

isDisabled () : {boolean}

This method returns this UI element's disabled state as a boolean value.

setDisabled (disabled, opt_force) : {H.ui.base.Element}

This method set's the disabled state of this UI element.

getData () : {*}

This method returns a previously stored arbitrary data from this element.

setData (data)

This method stores arbitrary data with this UI element.

getElement () : {?HTMLElement}

This method returns the HTML element this UI element renders.

setVisibility (visibility)

Sets the visibility of this element.

getVisibility () : {boolean}

Returns the visibility of this element.

addClass (className) : {H.ui.base.Element}

This method adds a CSS class to this UI element (if it is not already present).

removeClass (className) : {H.ui.base.Element}

This method removes a CSS class from this UI element (if it is present).

Events Summary

Table 2. Events
Events

statechange : {H.util.Event}

This event is dispatched when state of the bubble has changed

Class Description

This class represents an information bubble bound to a geo-position on the map.

Constructor Details

H.ui.InfoBubble(position, opt_options)

Parameters:
 
position:
{H.geo.IPoint}
 
the geo-position to which this info bubble corresponds
opt_options:
{H.ui.InfoBubble.Options=} [optional]
 
optional parameters to be passed to the info bubble

Method Details

dispose ()

Disposes of this InfoBubble instance.

Note: Disposing of an info bubble does not automatically remove it from the UI's info bubble collection. Please call H.ui.UI#removeBubble before disposing of an info bubble instance.

setPosition (position)

This method sets the geo-position of this info bubble.

Parameters:
 
position:
{(H.geo.IPoint | H.geo.Point)}
 
the new geo-position of this bubble

getState () : {H.ui.InfoBubble.State}

This method returns this info bubbles current state.

Returns:
 
{H.ui.InfoBubble.State}
this bubble's current state

setState (state)

This method sets the info bubble's state.

Parameters:
 
state:
{H.ui.InfoBubble.State}
 
the new state

close ()

This method closes the info bubble (setting its state to CLOSED)

open ()

This method opens the info bubble (setting its state to OPEN)

getContentElement () : {?HTMLElement}

This method returns the bubble's content element.

Note: Before adding an info bubble to a UI object the content element is null.

Returns:
 
{?HTMLElement}
the content element of this info bubble

setContent (content)

This methods sets the content of the info bubble. This can either be a string (applied as innerHTML) to the content element of this info bubble or a HTML node which is appended to the content element.

Parameters:
 
content:
{(string | Node)}
 
the content for this bubble

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
event handler function
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
previously added event handler
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

renderInternal (element, doc)

This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes.

Parameters:
 
element:
{Element}
 
this UI element's HTML representation
doc:
{Document}
 
the HTML document into which the element is currently being rendered

isDisabled () : {boolean}

This method returns this UI element's disabled state as a boolean value.

Returns:
 
{boolean}
true if the element is disabled, false otherwise

setDisabled (disabled, opt_force) : {H.ui.base.Element}

This method set's the disabled state of this UI element.

Parameters:
 
disabled:
{boolean}
 
true to disabled the element, false to enabled it
opt_force:
{boolean=} [optional]
 
an optional boolean flag indicating that the value should be set and propagated even if it is the same as the current state
Returns:
 
{H.ui.base.Element}
this element instance

getData () : {*}

This method returns a previously stored arbitrary data from this element.

Returns:
 
{*}
the previously stored data object or null if not data was stored.

setData (data)

This method stores arbitrary data with this UI element.

Parameters:
 
data:
{*}
 
the data to be stored

getElement () : {?HTMLElement}

This method returns the HTML element this UI element renders.

Note: Before the UI element was rendered the method returns null.

Returns:
 
{?HTMLElement}
the element

setVisibility (visibility)

Sets the visibility of this element.

Parameters:
 
visibility:
{boolean}
 

getVisibility () : {boolean}

Returns the visibility of this element.

Returns:
 
{boolean}
visibility

addClass (className) : {H.ui.base.Element}

This method adds a CSS class to this UI element (if it is not already present).

Parameters:
 
className:
{string}
 
the CSS class name to add
Returns:
 
{H.ui.base.Element}
this UI element instance

removeClass (className) : {H.ui.base.Element}

This method removes a CSS class from this UI element (if it is present).

Parameters:
 
className:
{string}
 
the CSS class name to add
Returns:
 
{H.ui.base.Element}
this UI element instance

Event Details

statechange: {H.util.Event}

This event is dispatched when state of the bubble has changed

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.