Class sap.ui.vbm.RouteModule: sap/ui/vbm/Route

extends VoBase

Specific Visual Object element for a Route. A Route is a polyline, which is given as a list of geo-coordinates. In order to indicate direction an arrow head can be added at start and end. Further it is possible to have a dot at each point of the coordinate list.
Since the actual length of a route depends on the zoom level it might be only partly visible. Thus detail windows will be dynamically positioned in the middle of the visible route part.
A Route supports GeoMap internal drag'n drop with fine grained control on matching drag sources and drop targets. A drag'n drop operation is possible if any type in the drag source aggregation of the dragged visual object matches a type in the drop target aggregation of the target vo. Drag source and drop target types defined on element level apply only for a single element instance, except the element is used as template.

Constructor Summary
new sap.ui.vbm.Route(sId?, mSettings?)Constructor for a new Route.
Method Summary
sap.ui.vbm.Route.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vbm.Route with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vbm.Route.getMetadata()Returns a metadata object for class sap.ui.vbm.Route.
addDragSource(oDragSource)Adds some dragSource to the aggregation dragSource.
addDropTarget(oDropTarget)Adds some dropTarget to the aggregation dropTarget.
destroyDragSource()Destroys all the dragSource in the aggregation dragSource.
destroyDropTarget()Destroys all the dropTarget in the aggregation dropTarget.
getColor()Gets current value of property color.
getColorBorder()Gets current value of property colorBorder.
getDirectionIndicator()Gets current value of property directionIndicator.
getDotbordercolor()Gets current value of property dotbordercolor.
getDotcolor()Gets current value of property dotcolor.
getDotwidth()Gets current value of property dotwidth.
getDragSource()Gets content of aggregation dragSource.
getDropTarget()Gets content of aggregation dropTarget.
getEnd()Gets current value of property end.
getLineDash()Gets current value of property lineDash.
getLinewidth()Gets current value of property linewidth.
getPosition()Gets current value of property position.
getRoutetype()Gets current value of property routetype.
getStart()Gets current value of property start.
indexOfDragSource(oDragSource)Checks for the provided sap.ui.vbm.DragSource in the aggregation dragSource.
indexOfDropTarget(oDropTarget)Checks for the provided sap.ui.vbm.DropTarget in the aggregation dropTarget.
insertDragSource(oDragSource, iIndex)Inserts a dragSource into the aggregation dragSource.
insertDropTarget(oDropTarget, iIndex)Inserts a dropTarget into the aggregation dropTarget.
removeAllDragSource()Removes all the controls from the aggregation dragSource.
removeAllDropTarget()Removes all the controls from the aggregation dropTarget.
removeDragSource(vDragSource)Removes a dragSource from the aggregation dragSource.
removeDropTarget(vDropTarget)Removes a dropTarget from the aggregation dropTarget.
setColor(sColor)Sets a new value for property color.
setColorBorder(sColorBorder)Sets a new value for property colorBorder.
setDirectionIndicator(bDirectionIndicator)Sets a new value for property directionIndicator.
setDotbordercolor(sDotbordercolor)Sets a new value for property dotbordercolor.
setDotcolor(sDotcolor)Sets a new value for property dotcolor.
setDotwidth(sDotwidth)Sets a new value for property dotwidth.
setEnd(sEnd)Sets a new value for property end.
setLineDash(sLineDash)Sets a new value for property lineDash.
setLinewidth(sLinewidth)Sets a new value for property linewidth.
setPosition(sPosition)Sets a new value for property position.
setRoutetype(sRoutetype)Sets a new value for property routetype.
setStart(sStart)Sets a new value for property start.
Constructor Detail
new sap.ui.vbm.Route(sId?, mSettings?)
Constructor for a new Route.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.vbm.VoBase can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.ui.vbm.Route.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vbm.Route with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.vbm.VoBase.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.vbm.Route.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vbm.Route.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addDragSource(oDragSource): sap.ui.vbm.Route
Adds some dragSource to the aggregation dragSource.
Parameters:
{sap.ui.vbm.DragSource}oDragSource the dragSource to add; if empty, nothing is inserted
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
addDropTarget(oDropTarget): sap.ui.vbm.Route
Adds some dropTarget to the aggregation dropTarget.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget the dropTarget to add; if empty, nothing is inserted
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
destroyDragSource(): sap.ui.vbm.Route
Destroys all the dragSource in the aggregation dragSource.
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
destroyDropTarget(): sap.ui.vbm.Route
Destroys all the dropTarget in the aggregation dropTarget.
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
getColor(): string
Gets current value of property color.

The color of the route.

Default value is RGB(0;0;0).

Returns:
{string} Value of property color
getColorBorder(): string
Gets current value of property colorBorder.

The border color of the route.

Returns:
{string} Value of property colorBorder
getDirectionIndicator(): boolean
Gets current value of property directionIndicator.

Set to true if intermediate triangles along the route should show the direction only applicable if arrow head is defined ( start and/or end ) it is not recommended to use line dots in addition because the direction indicators generate additional line points at their head and base positions

Default value is false.

Returns:
{boolean} Value of property directionIndicator
getDotbordercolor(): string
Gets current value of property dotbordercolor.

The border color of the line dots of a route.

Default value is RGB(0;0;0).

Returns:
{string} Value of property dotbordercolor
getDotcolor(): string
Gets current value of property dotcolor.

The color for the line dots of a route.

Default value is RGB(0;0;0).

Returns:
{string} Value of property dotcolor
getDotwidth(): string
Gets current value of property dotwidth.

The diameter of a dot in a route.

Default value is 0.

Returns:
{string} Value of property dotwidth
getDragSource(): sap.ui.vbm.DragSource[]
Gets content of aggregation dragSource.

DragSource aggregation

Returns:
{sap.ui.vbm.DragSource[]}
getDropTarget(): sap.ui.vbm.DropTarget[]
Gets content of aggregation dropTarget.

DropTarget aggregation

Returns:
{sap.ui.vbm.DropTarget[]}
getEnd(): string
Gets current value of property end.

The end point type of the route.

  • 0: no endpoint
  • 1: arrow as endpoint

Default value is 0.

Returns:
{string} Value of property end
getLineDash(): string
Gets current value of property lineDash.

Defines the dashing style of the route using an array. The first value gives the length of the stroke and the second the length of the gap. Thus "1;1", would result in a doted line. However, strokes are painted with rounded endings. Thus the actual stroke length depends also on the line width. As a sample a stroke of 1 pixel length and a line width of 6 will result in at least 6 pixels total length. In that case the line dashing should be set to "1;6" for an equal length of stroke and gap!
The line dashing array can be extended to achive more complex pattern, e.g. "1;1;5;2" and so on.

Returns:
{string} Value of property lineDash
getLinewidth(): string
Gets current value of property linewidth.

The width of the route line. With width 0 no line is drawn.

Default value is 3.

Returns:
{string} Value of property linewidth
getPosition(): string
Gets current value of property position.

The position array of the route. The format is "lon0;lat0;0;...lonN;latN;0".

Returns:
{string} Value of property position
getRoutetype(): sap.ui.vbm.RouteType
Gets current value of property routetype.

Defines the type of the route, default is 'Straight'. Other types are 'Geodesic' which show the shortest path between two points, e.g. flightroutes

Default value is Straight.

Experimental API:Since 1.32.0 this method is experimental and might be modified or removed in future versions.

Experimental:
Since 1.32.0 this method is experimental and might be modified or removed in future versions.
Returns:
{sap.ui.vbm.RouteType} Value of property routetype
getStart(): string
Gets current value of property start.

The start point type of the route.

  • 0: no startpoint
  • 1: arrow head as startpoint

Default value is 0.

Returns:
{string} Value of property start
indexOfDragSource(oDragSource): int
Checks for the provided sap.ui.vbm.DragSource in the aggregation dragSource. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vbm.DragSource}oDragSource The dragSource whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfDropTarget(oDropTarget): int
Checks for the provided sap.ui.vbm.DropTarget in the aggregation dropTarget. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget The dropTarget whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertDragSource(oDragSource, iIndex): sap.ui.vbm.Route
Inserts a dragSource into the aggregation dragSource.
Parameters:
{sap.ui.vbm.DragSource}oDragSource the dragSource to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the dragSource should be inserted at; for a negative value of iIndex, the dragSource is inserted at position 0; for a value greater than the current size of the aggregation, the dragSource is inserted at the last position
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
insertDropTarget(oDropTarget, iIndex): sap.ui.vbm.Route
Inserts a dropTarget into the aggregation dropTarget.
Parameters:
{sap.ui.vbm.DropTarget}oDropTarget the dropTarget to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the dropTarget should be inserted at; for a negative value of iIndex, the dropTarget is inserted at position 0; for a value greater than the current size of the aggregation, the dropTarget is inserted at the last position
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
removeAllDragSource(): sap.ui.vbm.DragSource[]
Removes all the controls from the aggregation dragSource.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vbm.DragSource[]} An array of the removed elements (might be empty)
removeAllDropTarget(): sap.ui.vbm.DropTarget[]
Removes all the controls from the aggregation dropTarget.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.vbm.DropTarget[]} An array of the removed elements (might be empty)
removeDragSource(vDragSource): sap.ui.vbm.DragSource
Removes a dragSource from the aggregation dragSource.
Parameters:
{int|string|sap.ui.vbm.DragSource}vDragSource The dragSourceto remove or its index or id
Returns:
{sap.ui.vbm.DragSource} The removed dragSource or null
removeDropTarget(vDropTarget): sap.ui.vbm.DropTarget
Removes a dropTarget from the aggregation dropTarget.
Parameters:
{int|string|sap.ui.vbm.DropTarget}vDropTarget The dropTargetto remove or its index or id
Returns:
{sap.ui.vbm.DropTarget} The removed dropTarget or null
setColor(sColor): sap.ui.vbm.Route
Sets a new value for property color.

The color of the route.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is RGB(0;0;0).

Parameters:
{string}sColor New value for property color
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setColorBorder(sColorBorder): sap.ui.vbm.Route
Sets a new value for property colorBorder.

The border color of the route.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sColorBorder New value for property colorBorder
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setDirectionIndicator(bDirectionIndicator): sap.ui.vbm.Route
Sets a new value for property directionIndicator.

Set to true if intermediate triangles along the route should show the direction only applicable if arrow head is defined ( start and/or end ) it is not recommended to use line dots in addition because the direction indicators generate additional line points at their head and base positions

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Parameters:
{boolean}bDirectionIndicator New value for property directionIndicator
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setDotbordercolor(sDotbordercolor): sap.ui.vbm.Route
Sets a new value for property dotbordercolor.

The border color of the line dots of a route.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is RGB(0;0;0).

Parameters:
{string}sDotbordercolor New value for property dotbordercolor
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setDotcolor(sDotcolor): sap.ui.vbm.Route
Sets a new value for property dotcolor.

The color for the line dots of a route.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is RGB(0;0;0).

Parameters:
{string}sDotcolor New value for property dotcolor
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setDotwidth(sDotwidth): sap.ui.vbm.Route
Sets a new value for property dotwidth.

The diameter of a dot in a route.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
{string}sDotwidth New value for property dotwidth
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setEnd(sEnd): sap.ui.vbm.Route
Sets a new value for property end.

The end point type of the route.

  • 0: no endpoint
  • 1: arrow as endpoint

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
{string}sEnd New value for property end
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setLineDash(sLineDash): sap.ui.vbm.Route
Sets a new value for property lineDash.

Defines the dashing style of the route using an array. The first value gives the length of the stroke and the second the length of the gap. Thus "1;1", would result in a doted line. However, strokes are painted with rounded endings. Thus the actual stroke length depends also on the line width. As a sample a stroke of 1 pixel length and a line width of 6 will result in at least 6 pixels total length. In that case the line dashing should be set to "1;6" for an equal length of stroke and gap!
The line dashing array can be extended to achive more complex pattern, e.g. "1;1;5;2" and so on.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sLineDash New value for property lineDash
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setLinewidth(sLinewidth): sap.ui.vbm.Route
Sets a new value for property linewidth.

The width of the route line. With width 0 no line is drawn.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 3.

Parameters:
{string}sLinewidth New value for property linewidth
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setPosition(sPosition): sap.ui.vbm.Route
Sets a new value for property position.

The position array of the route. The format is "lon0;lat0;0;...lonN;latN;0".

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sPosition New value for property position
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setRoutetype(sRoutetype): sap.ui.vbm.Route
Sets a new value for property routetype.

Defines the type of the route, default is 'Straight'. Other types are 'Geodesic' which show the shortest path between two points, e.g. flightroutes

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Straight.

Experimental API:Since 1.32.0 this method is experimental and might be modified or removed in future versions.

Parameters:
{sap.ui.vbm.RouteType}sRoutetype New value for property routetype
Experimental:
Since 1.32.0 this method is experimental and might be modified or removed in future versions.
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining
setStart(sStart): sap.ui.vbm.Route
Sets a new value for property start.

The start point type of the route.

  • 0: no startpoint
  • 1: arrow head as startpoint

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
{string}sStart New value for property start
Returns:
{sap.ui.vbm.Route} Reference to this in order to allow method chaining