- Legend to Symbols

-
Class ovi.mapsapi.map.Polyline
Class Summary
A Polyline has multiple points that are traversed in order. The line between two consecutive points is always straight and defined by the shortest way between the two.
new ovi.mapsapi.map.Polyline
(path, [props])
Properties
Interface defining the Properties (keys) that can be passed to the constructor or the method.
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.
abstract
drawToTile
(image, pixelProjection, level)
: Number[]
The paint method that is to be invoked by the map rendering process.
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.
getNearest
(coord)
: ovi.mapsapi.geo.Coordinate
Returns the coordinate on the shape which is nearest to the input coordinate.
getNearestIndex
(coord)
: Number
Returns the index in the path which is closest to the given coordinate.
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.
project
(projection)
: ovi.mapsapi.util.Uint32Array
The method will project the geo coordinates into map points {@see ovi.mapsapi.geo.Uint30}
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
String
color
The color used for the stroke of the shape.
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.
lineJoin
The default lineJoin deprecated!
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.
ovi.mapsapi.geo.Shape
path
The path to define the shape.
ovi.mapsapi.util.IPen
pen
The default pen to draw the polyline
Number
simplify
A distance in pixel to specify if and how much the rendering result will be simplified.
String
stroke
The type of the stroke of the shape.
Boolean
visibility
The visibility of the Object.
Number
width
The width of the stroke of the shape in pixels.
Number
zIndex
The z-index relative to the container.
Direct Inheritance
Inherited from ovi.mapsapi.map.Spatial:
drawToTile
Indirect Inheritance
Inherited from ovi.mapsapi.map.Spatial.Properties:
simplify
Inherited from ovi.mapsapi.map.Object:
getBoundingBox
getDisplays
getParent
isAdded
isVisible
CHANGE_SPATIAL
CHANGE_VISUAL
CHANGE_ZINDEX
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
A Polyline has multiple points that are traversed in order.
new ovi.mapsapi.map.Polyline(path, [props])
Parameters:
| {ovi.mapsapi.geo.Strip | ovi.mapsapi.geo.Shape | ovi.mapsapi.geo.Coordinate[]} | path | The path as coordinate strip. |
| {ovi.mapsapi.map.Polyline.Properties} | [props]: | The initial values of the specified properties. |
Method Detail
getNearest
(coord)
: ovi.mapsapi.geo.Coordinate
Returns the coordinate on the shape which is nearest to the input coordinate.
Parameters:
| {ovi.mapsapi.geo.Coordinate} | coord | The input coordinate. |
Returns:
| {ovi.mapsapi.geo.Coordinate} | The shape coordinate which is nearest to the input coordinate. |
getNearestIndex
(coord)
: Number
Returns the index in the path which is closest to the given coordinate.
Parameters:
| {ovi.mapsapi.geo.Coordinate} | coord | The input coordinate. |
Returns:
| {Number} | The index of the shape coordinate which is closest to the given coordinate. |
project
(projection)
: ovi.mapsapi.util.Uint32Array
The method will project the geo coordinates into map points {@see ovi.mapsapi.geo.Uint30}
Parameters:
| {ovi.mapsapi.geo.IProjection} | projection | The projection by which the polyline's path will become projected. |
Returns:
| {ovi.mapsapi.util.Uint32Array} | the resulting projected coordinates which consists out of the projected map points and ("x" and "y" for each map point). Returns the array which contains alternating x- and y-components of the projected map points. |
Field Detail