- Legend to Symbols

-
Class ovi.mapsapi.map.Marker
Class Summary
A marker defines an Object that may display an icon on the map view.
new ovi.mapsapi.map.Marker
(coord, props)
Properties
Interface defining the Properties (keys) that can be passed to the constructor of all classes derived from ovi.mapsapi.map.Marker.
Method Summary
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.
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.
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.
click
(evt)
Fired after a mousedown/mouseup sequence at the same target happend.
dblclick
(evt)
Fired after two click events have been fired within a certain time period.
dbltap
(evt)
Fired after a two
tap events have been fired in a certain amount of time.
drag
(evt)
Fired at the target object of the
dragstart event while a drag operation is ongoing.
dragend
(evt)
Fired at the end of a drag operation at the object that was dragged, so which was the target of the
dragstart event.
dragenter
(evt)
Fired at an object if the mouse/finger is moved into the visible area of the object, while being within an drag operation.
dragleave
(evt)
Fired at the current drop target if the the mouse/finger leaves the visible area of the target.
dragover
(evt)
Fired at the current drop target while the mouse/finger is above the drop target.
dragstart
(evt)
Fired at an object that has the property
draggable set to true and after a mousedown/touch happened and the mouse/finger was moved for at least 3 pixel.
drop
(evt)
Fired at the current drop target if the mouse button or finger is release above it, that means that the
dragenter event and the dragover events where canceled, so their preventDefault methods where called and the allowedEffect property matches the dropEffect property.
gesturechange
(evt)
High level event that is fired whenever any of the two finger forming a gesture is moved, changing the properties of the gesture.
gestureend
(evt)
High level event that is fired as soon as the gesture ends, e.g.
gesturestart
(evt)
High level event that is fired as soon as two or more fingers are down at the touch screen and used to make a "gesture".
longpress
(evt)
Fired after a mouse button has been pressed for a certain amount of time without that a drag was started.
longpress
(evt)
Fired after a finger has been pressed for a certain amount of time without that a drag or gesture was started.
mousedown
(evt)
Fired if a mouse button has been pressed.
mouseenter
(evt)
Fired if the mouse cursor enters the visible area of a node, fired at the node that is entered.
mouseleave
(evt)
Fired if the mouse cursor leave the physical area of a node, fired at the node that is left.
mousemove
(evt)
Fired if the mouse is moved.
mouseout
(evt)
Fired if the mouse cursor leaves the visible area of a node, fired at the node that is left.
mouseover
(evt)
Fired if the mouse cursor enters the visible area of a node, fired at the node that is entered.
mouseup
(evt)
Fired if a mouse button has been released.
mousewheel
(evt)
Fired if the mousewheel is moved.
tap
(evt)
Fired after a
touchstart and touchend happend at the same target and only if neither of the touchstart nor the touchend event have been canceled and no gesture was started in between.
touchend
(evt)
Fired as soon as a finger is released from a touch screen.
touchmove
(evt)
Fired as soon as a finger is moved above a touch screen.
touchstart
(evt)
Fired as soon as a finger is pushed at a touch screen.
get
(key)
: Variant
Returns the value of the property with the given name.
abstract
getBoundingBox
()
: ovi.mapsapi.geo.BoundingBox
Calculates the outer geographic bounding box of this object.
getDisplayBoundingBox
(display)
: ovi.mapsapi.util.Rectangle
Returns the pixel bounding box of the marker on a specific display.
getDisplayOffset
(display, x, y)
: ovi.mapsapi.util.Point | null
Returns the offset in pixel of the origin position of this marker to the given display pixel position.
getDisplays
()
: ovi.mapsapi.map.Display[]
Returns the displays to which this object is connected.
getIconForRendering
([doc])
: ovi.mapsapi.gfx.Image
Returns the icon bound to the given document.
getParent
(display)
: ovi.mapsapi.map.Object
Returns the parent of this map object.
hitTest
(pageX, pageY)
: Boolean
Tests if the given x/y position relative to the document lies within the outer bounding box of this node.
hitTest
(display, x, y, [tolerance])
: Boolean
To test if the marker covers the given screen coordinate.
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.
isAdded
(display)
: Boolean
To check if this map object is added to the given display.
isVisible
(display)
: Boolean
Returns true if the object's visibility as well as all parent's visibilities are true and if the object is attached to a map (i.e.
project
(projection)
: ovi.mapsapi.util.Strip
The method will project the marker's coordinate into a map pixel and returns it as a one element strip.
remove
(key)
: ovi.mapsapi.util.OObject
Removes the property with the given name.
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).
Field Summary
Number
CHANGE_SPATIAL
Represents the invalidation type for spatial changes
Number
CHANGE_VISUAL
Represents the invalidation type for visual changes
Number
CHANGE_ZINDEX
Represents the invalidation type for zIndex changes
ovi.mapsapi.util.IPoint
anchor
Anchor point of this Object.
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)(,…)
ovi.mapsapi.map.IHitArea
hitArea
The optional hit area of the Marker.
ovi.mapsapi.gfx.Image | Image | String
icon
The image that represent the marker's appearance.
Boolean
isEventTarget
A property to indicate that an object implements the ovi.mapsapi.dom.EventTarget interface.
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.
Boolean
visibility
The visibility of the Object.
Number
zIndex
The z-index relative to the container.
Direct Inheritance
Inherited from ovi.mapsapi.map.Object:
getBoundingBox
getDisplays
getParent
isAdded
isVisible
CHANGE_SPATIAL
CHANGE_VISUAL
CHANGE_ZINDEX
Indirect Inheritance
Inherited from ovi.mapsapi.dom.MouseEventTarget:
click
dblclick
longpress
mousedown
mouseenter
mouseleave
mousemove
mouseout
mouseover
mouseup
mousewheel
Inherited from ovi.mapsapi.dom.DragEventTarget:
drag
dragend
dragenter
dragleave
dragover
dragstart
drop
Constructor Detail
Defines an Object that may display an icon on the map view.
new ovi.mapsapi.map.Marker(coord, props)
Parameters:
| {ovi.mapsapi.geo.Coordinate} | coord | The coordinate of the marker |
| {ovi.mapsapi.map.Marker.Properties} | props | The initial values of the specified properties |
Method Detail
getDisplayBoundingBox
(display)
: ovi.mapsapi.util.Rectangle
Returns the pixel bounding box of the marker on a specific display.
Parameters:
| {ovi.mapsapi.map.Display} | display | The display for which the pixel bounding box of the marker should be determined. |
Returns:
| {ovi.mapsapi.util.Rectangle} |
Returns the rectangle of the pixel dimensions on the display or null
if the marker is not connected to the display or no icon is set to the marker.
|
getDisplayOffset
(display, x, y)
: ovi.mapsapi.util.Point | null
Returns the offset in pixel of the origin position of this marker to the given display pixel position.
Parameters:
| {ovi.mapsapi.map.Display} | display | The display for which the offset should be calculated. |
| {Object} | x | The x position relative to the top-left corner of the display. |
| {Object} | y | The y position relative to the top-left corner of the display. |
Returns:
| {ovi.mapsapi.util.Point | null} | the offset in pixel of the origin position of this marker to the given display pixel position or null, if this object is not visible in the current display. |
getIconForRendering
([doc])
: ovi.mapsapi.gfx.Image
Returns the icon bound to the given document.
Parameters:
| {Document} | [doc]: document | The document to which the icon shall be bound. |
Returns:
| {ovi.mapsapi.gfx.Image} | The icon image for this marker bound to the given document. |
hitTest
(display, x, y, [tolerance])
: Boolean
To test if the marker covers the given screen coordinate.
If no hitArea is defined, whole screen bounding box of the marker take into account
Parameters:
| {ovi.mapsapi.map.Display} | display | The display for which the pixel bounding box should be determined. |
| {Number} | x | The X component of the screen coordinate in pixel |
| {Number} | y | The Y component of the screen coordinate in pixel |
| {Number} | [tolerance]: 0 | The tolerance to use for hit testing. |
Returns:
| {Boolean} | Indicates if the given coordinate is covered (TRUE) or not (FALSE). |
project
(projection)
: ovi.mapsapi.util.Strip
The method will project the marker's coordinate into a map pixel and returns it as a one element strip.
Parameters:
| {ovi.mapsapi.geo.IProjection} | projection | The projection by which the marker's coordinate will become projected. |
Returns:
| {ovi.mapsapi.util.Strip} | The resulting strip which consists out of the projected marker's coordinate. |