- Legend to Symbols

-
Class ovi.mapsapi.map.Object
Class Summary
A Object is the abstract base class for all visual objects shown in map, including the map itself. Objects are responsible to identify UI relevant state changes and automatically trigger a redraw. It is platform specific how and when this redraw will be performed.
Extends
ovi.mapsapi.dom.DragEventTarget, ovi.mapsapi.dom.EventTarget, ovi.mapsapi.dom.MouseEventTarget, ovi.mapsapi.dom.TouchEventTarget, ovi.mapsapi.map.Object.Properties, ovi.mapsapi.util.OObject.
ovi.mapsapi.map.Object
(props)
Properties
Interface defining the Properties (keys) that can be passed to the constructor of all classes derived from ovi.mapsapi.map.Object.
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.
getDisplays
()
: ovi.mapsapi.map.Display[]
Returns the displays to which this object is connected.
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.
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.
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
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
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.dom.DragEventTarget:
drag
dragend
dragenter
dragleave
dragover
dragstart
drop
Inherited from ovi.mapsapi.dom.EventTarget:
addListener
addListenerNS
disableDrag
disableUserSelect
dispatch
enableDrag
enableUserSelect
hitTest
insertListener
insertListenerNS
removeListener
removeListenerNS
draggable
eventListener
isEventTarget
parentNode
parentNodes
Inherited from ovi.mapsapi.dom.MouseEventTarget:
click
dblclick
longpress
mousedown
mouseenter
mouseleave
mousemove
mouseout
mouseover
mouseup
mousewheel
Constructor Detail
Base class for all visual objects shown in map.
ovi.mapsapi.map.Object(props)
Parameters:
| {ovi.mapsapi.map.Object.Properties} | props | The initial values of the specified properties. |
Method Detail
Calculates the outer geographic bounding box of this object. If the object has no geographic dimension, null
is returned. Note that the returned bounding box might have the size of zero, if the object is a one
dimensional object. This happens i.e. for ovi.mapsapi.map.Marker and
ovi.mapsapi.map.StandardMarker map object, because they are point object with a pure visual (pixel
base) representation.
Returns:
| {ovi.mapsapi.geo.BoundingBox} | The calculated geographic outer bounding box of this object or null, if the object has no geographic extension. |
getDisplays
()
: ovi.mapsapi.map.Display[]
Returns the displays to which this object is connected.
Returns:
| {ovi.mapsapi.map.Display[]} | The displays to which this object is connected. |
getParent
(display)
: ovi.mapsapi.map.Object
Returns the parent of this map object.
Parameters:
| {ovi.mapsapi.map.Display} | display | The display for which to return the parent object. |
Returns:
| {ovi.mapsapi.map.Object} |
The parent object of this object for the given display or undefined if this map object has no parent.
|
isAdded
(display)
: Boolean
To check if this map object is added to the given display.
Parameters:
| {ovi.mapsapi.map.Display} | display | The display to check. |
Returns:
| {Boolean} |
true 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. parent chain ends with a map). The returned value is only valid for the given
ovi.mapsapi.map.Display object.
Parameters:
| {ovi.mapsapi.map.Display} | display | The display to check. |
Returns:
| {Boolean} | true, if object is currently connected to and visible on the given display. |