Nokia Maps API Reference

Contents

Class nokia.maps.map.Object

Class Summary

Object is the abstract base class for the map itself and for all visual objects that can be displayed in the map. It is responsible for identifying UI state changes and automatically triggering a redraw. Redraws are platform specific in terms of how and when they are performed.

Properties Interface defining the Properties (keys) that can be passed to the constructor of all classes derived from nokia.maps.map.Object.
Method Summary
addListener (type, listener, useCapture) : Object This method registers an event listener.
addListenerNS (namespaceURI, type, listener, useCapture) : nokia.maps.dom.EventTarget This method registers an event listener for events originating from a specific namespace.
addObserver (key, callback, [context]) : nokia.maps.util.OObject This method registers an observer for the property named by the caller.
destroy () This method clean up itself and remove instance from all connected Displays.
disableDrag () : nokia.maps.dom.EventTarget This method disables dragging of this event target, causing this event target not to receive dragstart, drag and dragend events.
disableUserSelect () : nokia.maps.dom.EventTarget This method prevents user selection of text and elements within the event target and prevents the magnifier on the iPhone or other similar mobile devices.
dispatch (evt) : Boolean This method dispatches an event.
enableDrag () : nokia.maps.dom.EventTarget This method enables dragging of this event target and disables the user selection, allowing this event target to receive dragstart, drag and dragend events.
enableUserSelect () : nokia.maps.dom.EventTarget This method allows the user to select text and elements within the event target and allows the magnifier on the iPhone or other similar mobile devices.
click (evt) This event is fired after a mousedown/mouseup sequence at the same target has occurred.
dblclick (evt) This event is fired after two click events have been fired within a certain time period.
dbltap (evt) This event is fired after a two tap events have been fired in a certain amount of time.
drag (evt) This event is fired at the target object of the dragstart event while a drag operation is in propgress.
dragend (evt) This event is fired at the end of a drag operation at the object that was dragged (the target of the dragstart event).
dragenter (evt) This event is fired at an object if the mouse/finger is moved into the visible area of the object during a drag operation.
dragleave (evt) This event is fired at the current drop target if the the mouse/finger leaves the visible area of the target.
dragover (evt) This event is fired at the current drop target while the mouse/finger is on/above the drop target.
dragstart (evt) This event is fired at an object that has the property draggable set to true and after a mousedown/touch has occurred and the mouse/finger was moved at least three pixels.
drop (evt) This event is fired at the current drop target if the mouse button or finger is released on/above it, which means that the dragenter event and the dragover events were canceled, so their preventDefault methods were called and the allowedEffect property matches the dropEffect property.
gesturechange (evt) This high-level event is fired whenever either of the two finger making a gesture is moved, changing the properties of the gesture.
gestureend (evt) This high-level event is fired as soon as the gesture ends, for example because one of the two fingers touching the touch screen are lifted.
gesturestart (evt) This high-level event is fired when two or more fingers touch the touch screen and are used to make a "gesture".
longpress (evt) This event is fired after a mouse button has been pressed for a certain amount of time without starting a drag.
longpress (evt) This event is fired after a finger has been pressed against the screen for a certain amount of time without starting a drag or gesture.
mousedown (evt) This event is fired if a mouse button has been pressed.
mouseenter (evt) This event is fired if the mouse cursor enters the visible area of a node -- it is fired at the node that the mouse has entered.
mouseleave (evt) This event is fired when the mouse cursor leaves the physical area of a node -- it is fired at the node the mouse has left.
mousemove (evt) This event is fired if the mouse is moved.
mouseout (evt) This event is fired if the mouse cursor leaves the visible area of a node -- the event is fired at the node that the mouse has left.
mouseover (evt) This event is fired when the mouse cursor enters the visible area of a node -- the event is fired at the node that is entered.
mouseup (evt) This event is fired if a mouse button has been released.
mousewheel (evt) This event is fired if the mousewheel is moved.
tap (evt) This event is fired after a touchstart and touchend has occurred at the same target and only if neither of the touchstart nor the touchend event has been canceled and no gesture was started in between.
touchend (evt) This event is fired when a finger is lifted from a touch screen.
touchmove (evt) This event is fired when a finger touches and moves on a touch screen.
touchstart (evt) This event is fired when a finger is touches a touch screen.
get (key) : Variant This method retrieves the value of the property with the name provided by the caller.
abstract getBoundingBox () : nokia.maps.geo.BoundingBox This method calculates the outer geographic bounding box of the given object.
getDisplays () : nokia.maps.map.Display[] This method retrieves the instances of map.Display to which the given object is connected.
getParent (display) : nokia.maps.map.Object This method retrieves the parent of the given map object.
insertListener (type, listener, useCapture) : Object This method registers an event listener as the first listener in the listener chain.
insertListenerNS (namespaceURI, type, listener, useCapture) : nokia.maps.dom.EventTarget This method registers an event listener for events originating from a specific namespace as the first in the listener chain.
isAdded (display) This method checks if the given map object has been added to the instance of map.Display specified by the caller.
isVisible (display) This method checks if the given map object is visible.
nmHitTest (pageX, pageY) : Boolean This method tests if the given x/y position relative to the document lies within the outer bounding box of the node corresponding to the given EventTarget object.
remove (key) : nokia.maps.util.OObject This method removes the property with the name provided by the caller.
removeListener (type, listener, useCapture) : nokia.maps.dom.EventTarget This method removes an event listener.
removeListenerNS (namespaceURI, type, listener, useCapture) : nokia.maps.dom.EventTarget This method removes an event listener for events originating from a specific namespace.
removeObserver (key, callback, context) : nokia.maps.util.OObject This method removes the observer for the property named by the caller.
set (nameOrObject, [value, [force]]) : nokia.maps.util.OObject This method sets property values, using the property names and values supplied by the caller.
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 This property indicates if the given event target is draggable and may receive a dragstart, drag and dragend events (true); false otherwise.
Object eventListener This property is either undefined or holds a hash table that, for every event type, contains an array with the values: (listener, useCapture, namespaceURI)(, listener, useCapture, namespaceURI)(,…)
Boolean isEventTarget This property indicates whether an object implements the nokia.maps.dom.EventTarget interface (true>) or not (false).
nokia.maps.dom.EventTarget parentNode This property holds a reference to the parent node of the event target (if set).
Object parentNodes If this property is set it holds a hash table that contains the "namespaceURI" as key and the corresponding value is the parent node of the given event target.
Boolean visibility A flag that determines the visibility of the given Object instance.
Number zIndex The z-index relative to the container.
Constructor Detail

This method creates an instance of Object, which is the base class for the map as well as all visual objects shown in the map.

nokia.maps.map.Object(props)
Parameters:
{nokia.maps.map.Object.Properties} props An object providing the initial values of the properties it contains.
Method Detail
destroy ()
This method clean up itself and remove instance from all connected Displays. It is allways better to call this method when instance is not needed instead of throwing away instance reference only.
abstract getBoundingBox () : nokia.maps.geo.BoundingBox
This method calculates the outer geographic bounding box of the given object. If the object has no geographic dimensions, 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 for example for instances of nokia.maps.map.Marker and nokia.maps.map.StandardMarker, because they are point objects with a pure visual (pixel base) representation.
Returns:
{nokia.maps.geo.BoundingBox} The calculated geographic outer bounding box object or null, if the object has no geographic dimensions
getDisplays () : nokia.maps.map.Display[]
This method retrieves the instances of map.Display to which the given object is connected.
Returns:
{nokia.maps.map.Display[]} An array containing the display instances to which the given object is connected
getParent (display) : nokia.maps.map.Object
This method retrieves the parent of the given map object. The caller must supply an instance of Display with which the map object is associated and from which to retrieve the parent object.
Parameters:
{nokia.maps.map.Display} display The Display instance from which to retrieve the parent object of the given map object
Returns:
{nokia.maps.map.Object} The parent object of the given object for the specified display or undefined if the map object has no parent
isAdded (display)
This method checks if the given map object has been added to the instance of map.Display specified by the caller.
Parameters:
{nokia.maps.map.Display} display The display to check
Returns:
A {Boolean} value indicating if the given object has been added to the caller-specified display (true) or not (false)
isVisible (display)
This method checks if the given map object is visible. The method returns true provided that the object itself is visible, all its parent objects are visible, and if the object is attached to a map (parent chain ends with a map). The returned value is only valid for the instance of nokia.maps.map.Display specified by the caller.
Parameters:
{nokia.maps.map.Display} display The display within which to check visibility
Returns:
A {Boolean} value, true if the given map object is currently connected to and visible in the specified Display instance
Field Detail
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
Documentation generated on Mon Oct 24 2011 14:24:37 GMT+0200 (CEST).