Maps API for JavaScript Developer's Guide

H.map.AbstractMarker

Class Summary

Extends: H.map.Object

This class represents marker, which offers a means of identifying a location on the map with an icon.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

getPosition () : {H.geo.Point}

This method returns this marker's current position.

setPosition (position) : {H.map.AbstractMarker}

This method sets the marker's current position.

getIcon () : {!(H.map.Icon | H.map.DomIcon)}

Returns this marker's current icon.

setIcon (icon) : {H.map.AbstractMarker}

Sets the marker's current icon.

getId () : {*}

Returns the ID of this object.

setVisibility (opt_visibility) : {H.map.Object}

Sets the visibility of this object.

getVisibility (opt_effective) : {boolean}

Returns the visibility of this object.

getZIndex () : {(number | undefined)}

Returns the z-index of this object.

setZIndex (zIndex) : {H.map.Object}

To set the-index of this object.

compareZOrder (other) : {number}

Compares the rendering z-order of this object with another object.

getParentGroup () : {?H.map.Group}

Returns the parent group which contains this object or null if the object is not contained by any group.

getRootGroup () : {!H.map.Object}

The root object in which this object is attached or the object itself.

contains (object) : {boolean}

Checks whether the given object is an inclusive descendant of this object

getProvider () : {?H.map.provider.ObjectProvider}

The current provider of this object

getInvalidations () : {H.map.provider.Invalidations}

Returns the invalidations of this object

invalidate (flags) : {boolean}

This method invalidates this map object.

getData () : {*}

This method returns previously stored arbitrary data from this object.

setData (data) : {H.map.Object}

This method stores arbitrary data with this map object

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible.

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

dispatchEvent (evt)

This method will dispatch event on the event target object

dispose ()

Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

addOnDisposeCallback (callback, opt_scope)

This method adds callback which is triggered when the object is being disposed

Events Summary

Table 2. Events
Events

visibilitychange : {H.util.ChangeEvent}

Fired when this object's visibility changes

zindexchange : {H.util.ChangeEvent}

Fired when this object's z-index changes

Class Description

This class represents marker, which offers a means of identifying a location on the map with an icon.

A marker consists of a geographic location and a visual representation in the form of a bitmap or a DOM element. Markers are rendered in screen space, i.e. while they are always fixed to their geographic location their icon is always rendered independently of the map's zoom level.

Constructor Details

H.map.AbstractMarker(position, opt_options)

Parameters:
 
position:
{H.geo.IPoint}
 
The location of this marker
opt_options:
{H.map.AbstractMarker.Options=} [optional]
 
The values to initialize this marker

Method Details

getPosition () : {H.geo.Point}

This method returns this marker's current position.

Returns:
 
{H.geo.Point}
current marker geo position

setPosition (position) : {H.map.AbstractMarker}

This method sets the marker's current position.

Parameters:
 
position:
{H.geo.IPoint}
 
Returns:
 
{H.map.AbstractMarker}
the marker itself

getIcon () : {!(H.map.Icon | H.map.DomIcon)}

Returns this marker's current icon.

Returns:
 
{!(H.map.Icon | H.map.DomIcon)}

setIcon (icon) : {H.map.AbstractMarker}

Sets the marker's current icon.

Parameters:
 
icon:
{!(H.map.Icon | H.map.DomIcon)}
 
The new marker icon
Returns:
 
{H.map.AbstractMarker}
the marker itself

getId () : {*}

Returns the ID of this object.

Returns:
 
{*}

setVisibility (opt_visibility) : {H.map.Object}

Sets the visibility of this object.

Parameters:
 
opt_visibility:
{boolean=} [optional]
 
Indicates whether this map object should be visible.
Returns:
 
{H.map.Object}
returns this object

getVisibility (opt_effective) : {boolean}

Returns the visibility of this object.

Parameters:
 
opt_effective:
{boolean=} [optional]
 
Indicates that the effective visibility is requested. In this case the visibility of all possible ancestor groups is also taken into account
Returns:
 
{boolean}

getZIndex () : {(number | undefined)}

Returns the z-index of this object.

Returns:
 
{(number | undefined)}

setZIndex (zIndex) : {H.map.Object}

To set the-index of this object.

Parameters:
 
zIndex:
{(number | undefined)}
 
Returns:
 
{H.map.Object}
returns this object

compareZOrder (other) : {number}

Compares the rendering z-order of this object with another object.

Parameters:
 
other:
{H.map.Object}
 
The other map object to compare with
Returns:
 
{number}
If less then 0 the first object has a lower z-order. If equal 0 booth objects have the same z-order. If greater then 0 the first object has a higher z-order.

getParentGroup () : {?H.map.Group}

Returns the parent group which contains this object or null if the object is not contained by any group.

Returns:
 
{?H.map.Group}

getRootGroup () : {!H.map.Object}

The root object in which this object is attached or the object itself.

Returns:
 
{!H.map.Object}

contains (object) : {boolean}

Checks whether the given object is an inclusive descendant of this object

Parameters:
 
object:
{*}
 
The object that's being compared against.
Returns:
 
{boolean}

getProvider () : {?H.map.provider.ObjectProvider}

The current provider of this object

Returns:
 
{?H.map.provider.ObjectProvider}
the current provider

getInvalidations () : {H.map.provider.Invalidations}

Returns the invalidations of this object

Returns:
 
{H.map.provider.Invalidations}
an invalidation object

invalidate (flags) : {boolean}

This method invalidates this map object.

Parameters:
 
flags:
{H.math.BitMask}
 
The flags indicating the types of occurred changes
Returns:
 
{boolean}
indicates whether a validtion was executed (only if the object has a provider)

getData () : {*}

This method returns previously stored arbitrary data from this object.

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

setData (data) : {H.map.Object}

This method stores arbitrary data with this map object

Parameters:
 
data:
{*}
 
the data to be stored
Returns:
 
{H.map.Object}
returns this map object instance

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object. Keep in mind, that you must removeEventListener manually or dispose an object when you no longer need it. Otherwise memory leak is possible.

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

dispatchEvent (evt)

This method will dispatch event on the event target object

Parameters:
 
evt:
{(H.util.Event | string)}
 
event object or event name

dispose ()

Removes listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

addOnDisposeCallback (callback, opt_scope)

This method adds callback which is triggered when the object is being disposed

Parameters:
 
callback:
{!Function}
 
The callback function.
opt_scope:
{Object=} [optional]
 
An optional scope to call the callback in.

Event Details

visibilitychange: {H.util.ChangeEvent}

Fired when this object's visibility changes

Deprecated:
since 3.0.7.0

zindexchange: {H.util.ChangeEvent}

Fired when this object's z-index changes

Deprecated:
since 3.0.7.0

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.