- Legend to Symbols

-
Class nokia.maps.map.Display
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.
nokia.maps.map.Display constructor.
Display instance.
Display instance and frees the resources.
Displays.
dragstart, drag and dragend events.
dragstart, drag and dragend events.
tap events have been fired in a certain amount of time.
dragstart event while a drag operation is in propgress.
dragstart event).
draggable set to true and after a mousedown/touch has occurred and the mouse/finger was moved at least three pixels.
dragenter event and the dragover events were canceled, so their preventDefault methods were called and the allowedEffect property matches the dropEffect property.
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.
Display instance, including all child containers.
null if no component with such an identifier is currently attached to the Display instance.
map.Display to which the given object is connected.
EventTarget object.
map.Display specified by the caller.
nokia.maps.map.Display).
dragstart, drag and dragend events (true); false otherwise.
[(listener, useCapture, namespaceURI)(, listener, useCapture, namespaceURI)(, …)]
true>) or not (false).
Object instance.
This method displays a geographical map, allowing multiple containers and objects to be added to it.
| {DOMElement} | container | The DOM node where the map should be established |
| {nokia.maps.map.Display.Properties} | props | The initial values of the specified properties |
The data property of the event object provides information of all changes
(see: nokia.maps.map.Display.MapViewChangeEvent#data).
IMPORTANT: Many mapviewchange events can be fired within a second, therefore
you should avoid expensive operations within mapviewchange listeners.
| {nokia.maps.map.Display.MapViewChangeEvent} | event |
| {nokia.maps.map.Display.MapViewChangeEvent} | event |
| {nokia.maps.map.Display.MapViewChangeEvent} | event |
Note, that resizing a map will also trigger mapviewchange events.
| {nokia.maps.dom.Event} | event |
Note, that resizing a map will also trigger mapviewchange events.
| {nokia.maps.dom.Event} | event |
resizeend has beend fired.
Note, that resizing a map will also trigger mapviewchange events.
| {nokia.maps.dom.Event} | event |
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).
var component = display.addComponent(new nokia.maps.map.component.zoom.DoubleClick());
| {nokia.maps.map.component.Component} | component | A reference to the component to be added |
| {nokia.maps.map.component.Component} | A reference to the newly added component or to the existing component with the same identifier |
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.
Note: Result values outside the visible map area are likely to be very unreliable.
| {nokia.maps.geo.Coordinate} | coord | A point object containing WGS84 coordinates to be translated into a pixel position |
| {nokia.maps.util.Point} | An object containing the x and y pixel coordinates relative to the top left corner of the current viewport |
| {nokia.maps.geo.BoundingBox[]} | bBoxes | A list of bounding boxes. |
| {Number} | the computed zoom level |
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 that the method does not return the bounding box of the current viewport. For this purpose, please use the method nokia.maps.map.Display#getViewBounds.
| {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
|
| nokia.maps.map.Display#getViewBounds |
null if no
component with such an identifier is currently attached to the Display instance.
| {String} | id | The identifier of the component to retrieve |
| {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
|
| {Number} | x | the x coordinate of the pixel position |
| {Number} | y | the y coordinate of the pixel position |
| {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
|
| {Number} | x | the x coordinate of the pixel position |
| {Number} | y | the y coordinate of the pixel position |
| {nokia.maps.map.Object[]} | A list of map objects found at the given pixel position within the map viewport |
| {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 |
| {nokia.maps.map.Object[]} | A list of map objects found within the given rectangle |
| {nokia.maps.geo.BoundingBox} | The outer bounding box of the map view. |
| {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 |
| {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. |
| {nokia.maps.geo.Coordinate} | A point object containing the WGS84 coordinates of the caller-supplied pixel position. |
display.removeComponent(display.getComponentById("zoom.DoubleClick"));
| {nokia.maps.map.component.Component} | component | A reference to the component to be removed. |
| {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. |
undefined for those that should not be altered.
| {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 |
| {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 |
| {String} | alignment | The alignment relative to the map viewport, where the copyright is to be placed. |
| nokia.maps.map.Display#copyrightAlignment |
| {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. |
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
| {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
|
| {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. |
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.
| {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 |
| {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
|
| {nokia.maps.map.Display} |
A reference to the given instance of Display (this).
|
| {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. |
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.map.Display).
- topleft
- topcenter
- topright
- middleleft
- middlecenter
- middleright
- bottomleft
- bottomcenter
- bottomright
- Default Value:
- "bottomleft"
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.
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.
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.
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.
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.
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 map viewport determined by padding is taken into account when setting the following properties and by the following methods:
- nokia.maps.map.Display.Properties#center - map center is the center of the virtual viewport, not of the visible map
- nokia.maps.map.Display#setCenter - the map is centered in the virtual viewport, not in the visible area of the map
- nokia.maps.map.Display#getViewBounds - the bounding box of the virtual view port is calculated and returned by this method
- nokia.maps.map.Display#zoomTo - the zoom is set to ensure that the bounding box passed to this method is visible in the virtual viewport
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);