Nokia Maps API Reference

Contents

Class nokia.maps.map.Display

Class Summary

This class displays a geographical map, allowing multiple optional layers (containers) and objects such as markers, polylines, polygons, cirles, etc., to be added to it.

new nokia.maps.map.Display (container, props)
Properties This interface defines the properties (keys) that can be passed to the map nokia.maps.map.Display constructor.
Method Summary
addComponent (component) : nokia.maps.map.component.Component The method adds a new component to the given Display instance.
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 destroys the map Display instance and frees the resources.
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 finger has been pressed against the screen for a certain amount of time without starting a drag or gesture.
longpress (evt) This event is fired after a mouse button has been pressed for a certain amount of time without starting a drag.
event:mapviewchange (event) This event is fired each time after the map has been rendered in response to a change the map view (see nokia.maps.map.Display.MapViewChangeEvent).
event:mapviewchangeend (event) This event is fired when the map display has been rendered to process all map view changes (see nokia.maps.map.Display.MapViewChangeEvent).
event:mapviewchangestart (event) This event is fired immediately after the map view has been changed (see nokia.maps.map.Display.MapViewChangeEvent).
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.
event:resize (event) This event is fired each time a change of the display's size is detected.
event:resizeend (event) This event is fired when a resizing operation has been finished (i.e.
event:resizestart (event) This event is fired immediately after the size of the display has been changed.
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.
geoToPixel (coord) : nokia.maps.util.Point This method translates the received point object containing WGS84 coordinates into pixel coordinates relative to the top left corner of the map view.
get (key) : Variant This method retrieves the value of the property with the name provided by the caller.
getBestZoomLevel (bBoxes) : Number This method computes the minimum zoom level at which each of the given bounding boxes fit into the display area.
getBoundingBox () : nokia.maps.geo.BoundingBox This method calculates the outer bounding box of all map objects in the given Display instance, including all child containers.
getBoundingBox () : nokia.maps.geo.BoundingBox This method calculates the outer bounding box of the given container.
abstract getBoundingBox () : nokia.maps.geo.BoundingBox This method calculates the outer geographic bounding box of the given object.
getComponentById (id) : nokia.maps.map.component.Component The method returns the first component with the given identifier or null if no component with such an identifier is currently attached to the Display instance.
getDisplays () : nokia.maps.map.Display[] This method retrieves the instances of map.Display to which the given object is connected.
getObjectAt (x, y) : nokia.maps.map.Object This method retrieves the topmost visible object at the given position within the map viewport.
getObjectsAt (x, y) : nokia.maps.map.Object[] The method retrieves all objects that are visible at the given pixel position within the map viewport.
getObjectsWithin (left, top, right, bottom) : nokia.maps.map.Object[] This method returns all objects found within a rectangle defined in terms of the pixel coordinates of its top left and bottom right corners.
getParent (display) : nokia.maps.map.Object This method retrieves the parent of the given map object.
getViewBounds () : nokia.maps.geo.BoundingBox This method retrieves the outer bounding box of the map view (the smallest bounding box covering all visible points).
hitTest (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.
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.
pan (startX, startY, endX, endY, [animation]) This mehtod pans the map from the start point to the end point specified by the caller.
pixelToGeo (x, y) : nokia.maps.geo.Coordinate This method translates a pixel position within the viewport to geo coordinates.
remove (key) : nokia.maps.util.OObject This method removes the property with the name provided by the caller.
removeComponent (component) : Number The method decrements the reference counter of the supplied component and if the counter has reached zero, the method removes the component from display.
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.
setAttributes (animation, center, level, tilt, heading) This method sets a number of properties of the map.
setCenter (coord, [animation]) This method centers the map on the location specified by the caller.
setCopyrightAlignment (alignment) This method sets the position of the copyright information.
setHeading (heading, [animation]) This method sets the heading (bearing) of the map.
setPadding (padding1, [padding2, [padding3, [padding4]]]) This method sets the property nokia.maps.map.Display#padding.
setTilt (tilt, [animation]) This method sets the tilt of the map.
setZoomLevel (level, [animation, [toX, [toY]]]) This method sets the zoom level to the value specified by the caller.
update ([delay, [quick]]) : nokia.maps.map.Display This method causes the current map view to be re-rendered.
zoomTo (boundingBox, keepCenter, [animation]) This method zooms the map to ensure that the bounding box provided by the caller is visible in its entirety in the map viewport.
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
nokia.maps.map.Provider NORMAL This type indicates a normal street map.
nokia.maps.map.Provider SATELLITE This type indicates a satellite map.
nokia.maps.map.Provider SMARTMAP This type indicates a smart map.
nokia.maps.map.Provider SMART_PT This type indicates a public transport map; is using the smart map color scheme with additional public transport route lines on top.
nokia.maps.map.Provider TERRAIN This type indicates a topographical map, where shading and color convey the shape of the terrain.
nokia.maps.map.Provider TRAFFIC This type indicates a traffic info map; is using the smart map color scheme with additional traffic coloring for major streets and highways on top.
nokia.maps.util.OList animation This property specifies the currently supported map animation types.
nokia.maps.util.OList availableBaseMapTypes A list of all available nokia.maps.map.Providers for base map types.
nokia.maps.util.OList availableOverlays A list of all available nokia.maps.map.Providers for map overlays.
nokia.maps.map.Provider baseMapType This property holds the current base map type to be used for display (such as satellite, terrain, hybrid).
nokia.maps.geo.Coordinate center This property contains the coordinates of the map center.
nokia.maps.util.OList components The list of all components that have been added to the map (to the given instance of nokia.maps.map.Display).
String copyrightAlignment This property specifies the position of the copyright information relative to the display.
Number copyrightHeight The height in pixels of the frame containing the text "Copyright by .
nokia.maps.util.IPoint copyrightPosition This property holds the position of the frame containing the label "Copyright by ".
Number copyrightWidth The width in pixels of the frame containing the text "Copyright by .
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)(,…)
Number fading This property holds a value indicating the length of time (in milliseconds) over which new asynchronously provided tiles are faded into the display.
Boolean fixedCenter This property is a flag indicating if the center of the map should remain unchanged if the display is resized or padding changes.
Number heading This property holds the heading (bearing) of the map in degrees.
Number height The height of the map area in pixels.
Boolean isEventTarget This property indicates whether an object implements the nokia.maps.dom.EventTarget interface (true>) or not (false).
Number margin This property holds the size of the supplemental rendering area.
Number maxHeading The maximum supported map heading (bearing).
Number maxTilt The maximum supported map tilt.
Number maxZoomLevel The maximum zoom level supported by the map (considering the current heading/tilting).
Number minHeading The minimum supported map heading (bearing).
Number minTilt The minimum supported map tilt.
Number minZoomLevel The minimum zoom level supported by the map (considering the current heading/tilting).
nokia.maps.util.OList objects This property holds the map of objects that have been added to the given container.
nokia.maps.util.OList objects This property holds the list of all map objects included in the given container.
nokia.maps.util.OList overlays The list of all map overlays which are currently active for the map.
nokia.maps.util.IBox padding This property defines the padding in pixels for each side of the map display, thus setting a virtual viewport.
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.
Number poweredByHeight The height in pixels of the frame containing the logo "Powered by .
nokia.maps.util.IPoint poweredByPosition This property holds the position of the frame containing the label "Powered by ".
Number poweredByWidth The width in pixels of the frame containing the logo "Powered by .
Number tilt This property holds the value of the map tilt in degrees.
Boolean visibility A flag that determines the visibility of the given Object instance.
Number width The width of the map area in pixels.
Number zIndex The z-index relative to the container.
Number zoomLevel This property holds the zoom level of the current view.
Constructor Detail

This method displays a geographical map, allowing multiple containers and objects to be added to it.

new nokia.maps.map.Display(container, props)
Parameters:
{DOMElement} container The DOM node where the map should be established
{nokia.maps.map.Display.Properties} props The initial values of the specified properties
Events
mapviewchange(event)
This event is fired each time after the map has been rendered in response to a change the map view (see nokia.maps.map.Display.MapViewChangeEvent).

The data property of the event object provides information of all changes (see: nokia.maps.map.Display.MapViewChangeEvent#data).

IMPORTANT: Many mapviewchangeupdate events can be fired within a second, therefore you should avoid expensive operations within mapviewchangeupdate listeners.

Parameters:
{nokia.maps.map.Display.MapViewChangeEvent} event
mapviewchangeend(event)
This event is fired when the map display has been rendered to process all map view changes (see nokia.maps.map.Display.MapViewChangeEvent). At this point, you can safely execute more expensive operations to respond to a map view change (for example UI updates).
Parameters:
{nokia.maps.map.Display.MapViewChangeEvent} event
mapviewchangestart(event)
This event is fired immediately after the map view has been changed (see nokia.maps.map.Display.MapViewChangeEvent). However, it is fired only for the first change of the map view after a rendering of the map display has been finished.
Parameters:
{nokia.maps.map.Display.MapViewChangeEvent} event
resize(event)
This event is fired each time a change of the display's size is detected. It will fire multiple times during a continuos resize operation (e.g. if the display is being resized due to user input).

Note, that resizing a map will also trigger mapviewchange events.

Parameters:
{nokia.maps.dom.Event} event
resizeend(event)
This event is fired when a resizing operation has been finished (i.e. when no more changes of the display's size are detected for a certain time).

Note, that resizing a map will also trigger mapviewchange events.

Parameters:
{nokia.maps.dom.Event} event
resizestart(event)
This event is fired immediately after the size of the display has been changed. However, it is fired for the initial change of a single resize process until a resizeend has beend fired.

Note, that resizing a map will also trigger mapviewchange events.

Parameters:
{nokia.maps.dom.Event} event
Method Detail
addComponent (component) : nokia.maps.map.component.Component
The method adds a new component to the given Display instance. If a component with the same id already exists (has been added previously), the method returns that component after incrementing its reference counter (the method does not create/add multiple instances of the same component).
Examples:
var component = display.addComponent(new nokia.maps.map.component.zoom.DoubleClick());
Parameters:
{nokia.maps.map.component.Component} component A reference to the component to be added
Returns:
{nokia.maps.map.component.Component} A reference to the newly added component or to the existing component with the same identifier
destroy ()
This method destroys the map Display instance and frees the resources. The method may take up to a minute to complete, but afterwards, all of Display's properties are set to null and its methods are bound to an empty function.
geoToPixel (coord) : nokia.maps.util.Point
This method translates the received point object containing WGS84 coordinates into pixel coordinates relative to the top left corner of the map view. The coordinates of the top left corner of the map are (0,0).

Note: Result values outside the visible map area are likely to be very unreliable.

Parameters:
{nokia.maps.geo.Coordinate} coord A point object containing WGS84 coordinates to be translated into a pixel position
Returns:
{nokia.maps.util.Point} An object containing the x and y pixel coordinates relative to the top left corner of the current viewport
getBestZoomLevel (bBoxes) : Number
This method computes the minimum zoom level at which each of the given bounding boxes fit into the display area.
Parameters:
{nokia.maps.geo.BoundingBox[]} bBoxes A list of bounding boxes.
Returns:
{Number} the computed zoom level
getBoundingBox () : nokia.maps.geo.BoundingBox
This method calculates the outer bounding box of all map objects in the given Display instance, including all child containers. If the display does not contain any objects or child containers, the method returns null. If the display contains only one object that has no geographical dimensions such as a nokia.maps.map.Marker or nokia.maps.map.StandardMarker, then the returned bounding box may have the size of zero.

Note: The method does not return the bounding box of the current viewport. For this purpose, please use the method nokia.maps.map.Display#getViewBounds

Returns:
{nokia.maps.geo.BoundingBox} The calculated geographic outer bounding box of all map objects in the display or null, if the display does not contain any map objects
See:
nokia.maps.map.Display#getViewBounds
getComponentById (id) : nokia.maps.map.component.Component
The method returns the first component with the given identifier or null if no component with such an identifier is currently attached to the Display instance.
Parameters:
{String} id The identifier of the component to retrieve
Returns:
{nokia.maps.map.component.Component} The first component from the list of components with the given identifier or null if no component with such an identifier is currently attached to the Display instance
getObjectAt (x, y) : nokia.maps.map.Object
This method retrieves the topmost visible object at the given position within the map viewport.
Parameters:
{Number} x the x coordinate of the pixel position
{Number} y the y coordinate of the pixel position
Returns:
{nokia.maps.map.Object} The topmost object found at the given pixel position within the map viewport or undefined if no object has been found
getObjectsAt (x, y) : nokia.maps.map.Object[]
The method retrieves all objects that are visible at the given pixel position within the map viewport. The list is sorted according to the drawing order of the objects. The topmost object has an index of 0 in returned array.
Parameters:
{Number} x the x coordinate of the pixel position
{Number} y the y coordinate of the pixel position
Returns:
{nokia.maps.map.Object[]} A list of map objects found at the given pixel position within the map viewport
getObjectsWithin (left, top, right, bottom) : nokia.maps.map.Object[]
This method returns all objects found within a rectangle defined in terms of the pixel coordinates of its top left and bottom right corners.
Parameters:
{Number} left The left edge of the rectangle as a number of pixels relative to viewport origin
{Number} top The top edge of the rectangle as a number of pixels relative to viewport origin
{Number} right The right edge of the rectangle as a number of pixels relative to viewport origin
{Number} bottom The bottom edge of the rectangle as a number of pixels relative to viewport origin
Returns:
{nokia.maps.map.Object[]} A list of map objects found within the given rectangle
getViewBounds () : nokia.maps.geo.BoundingBox
This method retrieves the outer bounding box of the map view (the smallest bounding box covering all visible points).
Returns:
{nokia.maps.geo.BoundingBox} The outer bounding box of the map view.
pan (startX, startY, endX, endY, [animation])
This mehtod pans the map from the start point to the end point specified by the caller. Both points are defined in terms of screen coordinates. The effect is that the location under the end point moves to the screen coordinates given by the start point. This operation may use a platform specific animation if indicated by the corresponding optional animation string.
Parameters:
{Number} startX The x-position of the pixel relative to the top-left corner of the current view, indicating the x-coordinate of the point from which to to start panning
{Number} startY The y-position of the pixel relative to the top-left corner of the current view, indicating the y-coordinate of the point from which to start panning
{Number} endX The x-position of the pixel relative to the top-left corner of the current view, indicating the x-coordinate of the point to which to pan
{Number} endY The y-position of the pixel relative to the top-left corner of the current view, indicating the y-coordinates of the point to which to pan
{String} [animation]: The animation to be used while modifying the view, must be a value from the list of animation types nokia.maps.map.Display#animation
pixelToGeo (x, y) : nokia.maps.geo.Coordinate
This method translates a pixel position within the viewport to geo coordinates. The pixel position is relative to the top left corner of the viewport, (0,0), which is also the top left corner of the visible map. Note: Result values outside the visible map area are likely to be very unreliable.
Parameters:
{Number} x The x-coordinate of the pixel position to be translated into longitude.
{Number} y The y-coordinate of the pixel position to be translated into latitude.
Returns:
{nokia.maps.geo.Coordinate} A point object containing the WGS84 coordinates of the caller-supplied pixel position.
removeComponent (component) : Number
The method decrements the reference counter of the supplied component and if the counter has reached zero, the method removes the component from display.
Examples:
		display.removeComponent(display.getComponentById("zoom.DoubleClick"));
Parameters:
{nokia.maps.map.component.Component} component A reference to the component to be removed.
Returns:
{Number} The value of the reference counter of the component after the remove call, as long as this is a value above zero the component will not be removed.
setAttributes (animation, center, level, tilt, heading)
This method sets a number of properties of the map. The properties include animation, map center, zoom level, map tilt, and map bearing. You must provide actual values only for those properties you wish to change, and undefined for those that should not be altered.
Parameters:
{String} animation The animation to be used while modifying the view; must be a value from the list of animation types nokia.maps.map.Display#animation
{nokia.maps.geo.Coordinate} center The new map center given as an object containing geo coordinates
{Number} level The new zoom level given as a value between nokia.maps.map.Display#minZoomLevel and nokia.maps.map.Display#maxZoomLevel
{Number} tilt The new value of map tilt in degrees given as a value between nokia.maps.map.Display#minTilt and nokia.maps.map.Display#maxTilt
{Number} heading The new map heading (bearing) given as a value between nokia.maps.map.Display#minHeading and nokia.maps.map.Display#maxHeading
setCenter (coord, [animation])
This method centers the map on the location specified by the caller. The method may use a platform specific animation if indicated by the corresponding optional animation string.
Parameters:
{nokia.maps.geo.Coordinate} coord The location on which to center the map specified in terms of WGS84 coordinates
{String} [animation]: The animation to be used while modifying the view; must be a value from the list of animation types nokia.maps.map.Display#animation
setCopyrightAlignment (alignment)
This method sets the position of the copyright information.
Parameters:
{String} alignment The alignment relative to the map viewport, where the copyright is to be placed.
See:
nokia.maps.map.Display#copyrightAlignment
setHeading (heading, [animation])
This method sets the heading (bearing) of the map. The method may use a platform-specific animation if this is indicated by the corresponding optional animation string. Setting a heading value different than 0 is not supported at the moment, but will be in future.
Parameters:
{Number} heading The new value of map heading (bearing) as a number of degrees; a value between nokia.maps.map.Display#minHeading and nokia.maps.map.Display#maxHeading
{String} [animation]: The animation to be used while modifying the view; must be a value from the list of animation types nokia.maps.map.Display#animation.
setPadding (padding1, [padding2, [padding3, [padding4]]])
This method sets the property nokia.maps.map.Display#padding. The method accepts up to four arguments which provide padding values in the following order: top, right, bottom, left.

The caller must supply at least one argument and optionally up to four as shown in these examples:

  • setPadding(topRightBottomLeft); - one argument/value, indicates identical padding all round
  • setPadding(topAndBottom, rightAndLeft); - the fist argument sets top and bottom padding, the second right and left padding
  • setPadding(top, rightAndLeft, bottom); - the second argument sets right and left padding, the first and third arguments set top and bottom padding, respectively
  • setPadding(top, right, bottom, left); - the first argument sets top padding, the second right padding, the third bottom padding, and the fourth left padding
Parameters:
{Number} padding1 Top padding in pixels; if this is the only argument provided, it is used also to set right, bottom and left padding (padding is identical all round); if the caller provides only two arguments, padding1 sets both top and bottom padding
{Number} [padding2]: Right padding in pixels; if padding4 (left padding) is not specified by the caller, this argument determines both right and left padding
{Number} [padding3]: Bottom padding in pixels; if not provided, its value is the same as that of padding1 (top padding)
{Number} [padding4]: Left padding in pixels; if not provided, its value is supplied by padding2 (right padding) or padding1 (top padding) if padding2 is not provided
setTilt (tilt, [animation])
This method sets the tilt of the map. It may use a platform specific animation if indicated by the corresponding optional animation string. Setting a tilt value different than 0 is not supported at the moment, but will be in future.
Parameters:
{Number} tilt The new value of map tilt in degrees, a value between nokia.maps.map.Display#minTilt and nokia.maps.map.Display#maxTilt.
{String} [animation]: The animation to be used while modifying the map view; must be a value from the list of animation types nokia.maps.map.Display#animation.
setZoomLevel (level, [animation, [toX, [toY]]])
This method sets the zoom level to the value specified by the caller. The caller must provide the zoom level and can also supply the animation type and the screen coordinates of a point on which to zoom in (via the arguments toX and toY). This point may correspond, for example, to the mouse position at the time when the user scrolls the mouse wheel to zoom in or out.
Parameters:
{Number} level The new zoom level to be set, a value between nokia.maps.map.Display#minZoomLevel and nokia.maps.map.Display#maxZoomLevel
{String} [animation]: The animation to be used while modifying the view; must be a value from the list of animation types nokia.maps.map.Display#animation
{Number} [toX]: The x-position of the pixel relative to the top-left corner of the current view to stay fixed
{Number} [toY]: The y-position of the pixel relative to the top-left corner of the current view to stay fixed
update ([delay, [quick]]) : nokia.maps.map.Display
This method causes the current map view to be re-rendered.
Parameters:
{Number} [delay]: The maximum acceptable delay before the next frame is rendered as a number of milliseconds; if the value is zero or less, rendering occurs synchronously or at the earliest opportunity; if the argument is omitted or undefined, the system determines when to carry out re-rendering
{Boolean} [quick]: false A Boolean to indicate whether full rendering (false) or only quick rendering (true is to be performed; quick rendering uses only cached data, while full rendering may request new data and cause new or modified objects to be rendered; the argument is ignored if delay is omitted or undefined
Returns:
{nokia.maps.map.Display} A reference to the given instance of Display (this).
zoomTo (boundingBox, keepCenter, [animation])
This method zooms the map to ensure that the bounding box provided by the caller is visible in its entirety in the map viewport. The caller has the option of retaining the current map center, which may cause the zoom to be adjusted so that the bounding box is visible while the map center remains unchanged. The method may use a platform specific animation if this is indicated by the corresponding optional animation string.
Parameters:
{nokia.maps.geo.BoundingBox} boundingBox The bounding box that is to be visible in its entirety in the map viewport
{Boolean} keepCenter A Boolean indicating whether to keep the map center unchanged (true) or if the view center may change (false);
{String} [animation]: The animation to be used; must be a value from the list of animation types nokia.maps.map.Display#animation.
Field Detail
This type indicates a normal street map.
This type indicates a satellite map.
This type indicates a smart map. similar to normal street map, but with optimized color set ready to show additional overlay information.
This type indicates a public transport map; is using the smart map color scheme with additional public transport route lines on top. Availability of public transport information may vary.
This type indicates a topographical map, where shading and color convey the shape of the terrain.
This type indicates a traffic info map; is using the smart map color scheme with additional traffic coloring for major streets and highways on top. Availability of traffic information may vary.
This property specifies the currently supported map animation types.

Animations depend on the platform and the rendering engine used, therefore this property must be checked at run-time to see if a specific animation is supported by the current rendering engine on the current platform.

Please note: Animation support in p2d-dom is not available at present. It will be introduced for certain environments in future releases.

In all cases, the following values for this property are supported:

  • "none" - no animation
  • "default" - default animation

Note 1: The default animation may be set to "none", which means that the rendering engine on the current platform does not support animation.

Note 2: If you specify an incorrect animation name, the animation type automatically reverts to "default".

nokia.maps.util.OList availableBaseMapTypes
A list of all available nokia.maps.map.Providers for base map types.
nokia.maps.util.OList availableOverlays
A list of all available nokia.maps.map.Providers for map overlays.
The list of all components that have been added to the map (to the given instance of nokia.maps.map.Display).
String copyrightAlignment
This property specifies the position of the copyright information relative to the display. The allowed values are:
  • topleft
  • topcenter
  • topright
  • middleleft
  • middlecenter
  • middleright
  • bottomleft
  • bottomcenter
  • bottomright
Default Value:
"bottomleft"
Number copyrightHeight
The height in pixels of the frame containing the text "Copyright by ...".
Number copyrightWidth
The width in pixels of the frame containing the text "Copyright by ...".
Number height
The height of the map area in pixels.
Number maxHeading
The maximum supported map heading (bearing). You can obtain the maximum supported heading by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("maxHeading") obtains the current value of maxHeading.
Number maxTilt
The maximum supported map tilt. You can obtain the maximum supported tilt by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("maxTilt") obtains the current value of maxTilt.
Number maxZoomLevel
The maximum zoom level supported by the map (considering the current heading/tilting). You can obtain the maximum supported zoom level by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("maxZoomLevel") obtains the current value of maxZoomLevel.
Number minHeading
The minimum supported map heading (bearing). You can obtain the minimum supported heading by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("minHeading") obtains the current value of minHeading.
Number minTilt
The minimum supported map tilt. You can obtain the minimum supported tilt by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("minTilt") obtains the current value of minTilt.
Number minZoomLevel
The minimum zoom level supported by the map (considering the current heading/tilting). You can obtain the minimum supported zoom level by invoking the method get() on an instance of Display, with the name of this property as the only argument. For example, if "myMap" is an instance of map.Display, then the code myMap.get("minZoomLevel") obtains the current value of minZoomLevel.
The list of all map overlays which are currently active for the map.
This property defines the padding in pixels for each side of the map display, thus setting a virtual viewport. The virtual viewport does not affect the placing or the size of the visible map in the DOM node, but defines an area which excludes strips along the edges of the map that contain the UI elements zoom bar, copyright and map-type selector (if these elements are displayed). The virtual viewport is taken into consideration when setting the map center, when obtaining the map view bounds and when zooming to a bounding box. Its other purpose is to help prevent objects from overlapping very close to the edges of the visible map.

The map viewport determined by padding is taken into account when setting the following properties and by the following methods:

This property cannot be changed directly. Use the methods nokia.maps.map.Display#setPadding or the inherited nokia.maps.util.OObject#set instead. For example, you can call the method set() as follows:

set("padding", aPadding);
Number poweredByHeight
The height in pixels of the frame containing the logo "Powered by ...".
Number poweredByWidth
The width in pixels of the frame containing the logo "Powered by ...".
Number width
The width of the map area in pixels.
Documentation generated on Thu Dec 15 2011 15:14:34 GMT+0100 (CET).