class sap.ui.vbm.Area

Control sample: sap.ui.vbm.Area
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vbm/Area
Application Component: CA-GTF-VBZ

Specific Visual Object element for an Area. An Area is a filled polygon, which border is given as a list of geo-coordinates. Areas can have multiple disjunct parts as well as each part can have an arbitrary number of exclusions/holes.
The inner part and the edges of areas are interactive and fire events on click.
Since the actual size of an area depends on the zoom level it might be only partly visible. Thus detail windows will open at the click position.


Constructor

Constructor for a new Area.

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

new sap.ui.vbm.Area(sId?, mSettings?)
Param Type Default Value Description
sId? string

id for the new control, generated automatically if no id is given

mSettings? object

initial settings for the new control


Properties

Name Type Default Value Description
borderDash string

Defines the dashing style of the area border using an array.

Visibility: public
color string

The fill color of the Area.

Visibility: public
colorBorder string

The border color of the Area.

Visibility: public
position string

The position array for the Area. For single part areas the format is "lon0;lat0;0.0;...;lonN,latN,0.0". For multi part areas you need to provide an array of arrays of the above position string: "[['lon0...'],['lon0...']]" (sequence of single and double quotes is important). Single and Multi part areas must not be mixed within one Areas aggregation.
Finally each area part can have multiple exclusions/holes. In that case the position list of excluded areas has follow the list of the base shape: "['lon0...', 'exLon0...']".

Visibility: public

Borrowed Properties

Name Type Default Value Description
changeable boolean false

Set to true if VO is changeable. Which properties are actually changeable can be controlled on the related VO aggregation.

Visibility: public
dragData string

Data to be dragged. This property allows you to provide an arbitrary data string, which is transfered to the target in a drag'n drop operation

Visibility: public
entity string

The visual object builds an entity/group with other VO elements when it is hovered. The property is not supported when the PlugIn is used.

Visibility: public
fxdir string true

The visual object is not rotated when the map is rotated. The property is only required when the PlugIn is used and only meaningful for some VOs.

Visibility: public
fxsize string true

The visual object should keep its size when the map is zoomed. Default value is 'true'. Only meaningful for some VOs.

Visibility: public
hotDeltaColor string RHLSA(0;1.3;1.0;1.0)

Color change applied when visual object is hovered. The format is RHLSA(<hue>;<lightness>;<saturation>;<opacity>). The hue shift is given in degree (0 to 360). The other parameters are given as multipliers, where 1 means the component remains unchanged.
Beside the delta color approach it is also possible to specify an absolute color in the usual CSS color formats (except named colors).

Visibility: public
hotScale string 1.0;1.0;1.0

Scaling factor applied when visual object is hovered. This is only supported on selected VOs, which do not present a defined geo area.

Visibility: public
key string

Unique identifier for the object. This is optional. If not provided the default identifier sId is used. However, sId is generated if template binding is used and thus it is not stable. Provide the key if the object really needs to have a unique and stable identifier.

Visibility: public
labelArrow boolean false

The visual objects label arrow. For left/right/top/bottom aligned labels an additional arrow points to the label's object.

Visibility: public
labelBgColor string RGB(255;255;255)

The visual objects label background color. The default value is white.

Visibility: public
labelBorderColor string

The visual objects label border color. The default is no border.

Visibility: public
labelPos string

The visual objects label position. This property determines the positioning of the label relative to the VO it belongs to. Possible values are:

  • 0: centered
  • 1: top
  • 2: top right
  • 3: right
  • 4: bottom right
  • 5: bottom
  • 6: bottom left
  • 7: left
  • 8: top left
The default alignment is VO specific.
For multiple position based VOs, like Route, or Area the label is dynamically positioned. If the current display of a VO consists of multiple disconnected parts, each part gets an own label.

Visibility: public
labelText string

The visual objects label text. Providing a label text required, but also sufficient the get a label displayed.

Visibility: public
labelType sap.ui.vbm.SemanticType None

Type for semantic labels. A given semantic type will overrule color settings and add an icon.

Visibility: public
select boolean false

Set to true if the element is selected

Visibility: public
selectColor string RHLSA(0.0;1.0;1.0;1.0)

Color change applied when visual object is selected. This can be explicit or a relative one. See above.

Visibility: public

Events Overview

Event Description
edgeClick

This event is raised when the edge of an Area is clicked.

edgeContextMenu

This event is raised when the edge of an Area is right clicked.

edgeClick

This event is raised when the edge of an Area is clicked.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

edgeContextMenu

This event is raised when the edge of an Area is right clicked.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
attachEdgeClick

Attaches event handler fnFunction to the edgeClick event of this sap.ui.vbm.Area.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Area itself.

This event is raised when the edge of an Area is clicked.

attachEdgeContextMenu

Attaches event handler fnFunction to the edgeContextMenu event of this sap.ui.vbm.Area.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Area itself.

This event is raised when the edge of an Area is right clicked.

detachEdgeClick

Detaches event handler fnFunction from the edgeClick event of this sap.ui.vbm.Area.

The passed function and listener object must match the ones used for event registration.

detachEdgeContextMenu

Detaches event handler fnFunction from the edgeContextMenu event of this sap.ui.vbm.Area.

The passed function and listener object must match the ones used for event registration.

sap.ui.vbm.Area.extend

Creates a new subclass of class sap.ui.vbm.Area 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.

fireEdgeClick

Fires event edgeClick to attached listeners.

fireEdgeContextMenu

Fires event edgeContextMenu to attached listeners.

getBorderDash

Gets current value of property borderDash.

Defines the dashing style of the area border using an array.

getColor

Gets current value of property color.

The fill color of the Area.

getColorBorder

Gets current value of property colorBorder.

The border color of the Area.

sap.ui.vbm.Area.getMetadata

Returns a metadata object for class sap.ui.vbm.Area.

getPosition

Gets current value of property position.

The position array for the Area. For single part areas the format is "lon0;lat0;0.0;...;lonN,latN,0.0". For multi part areas you need to provide an array of arrays of the above position string: "[['lon0...'],['lon0...']]" (sequence of single and double quotes is important). Single and Multi part areas must not be mixed within one Areas aggregation.
Finally each area part can have multiple exclusions/holes. In that case the position list of excluded areas has follow the list of the base shape: "['lon0...', 'exLon0...']".

setBorderDash

Sets a new value for property borderDash.

Defines the dashing style of the area border using an array.

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

setColor

Sets a new value for property color.

The fill color of the Area.

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

setColorBorder

Sets a new value for property colorBorder.

The border color of the Area.

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

setPosition

Sets a new value for property position.

The position array for the Area. For single part areas the format is "lon0;lat0;0.0;...;lonN,latN,0.0". For multi part areas you need to provide an array of arrays of the above position string: "[['lon0...'],['lon0...']]" (sequence of single and double quotes is important). Single and Multi part areas must not be mixed within one Areas aggregation.
Finally each area part can have multiple exclusions/holes. In that case the position list of excluded areas has follow the list of the base shape: "['lon0...', 'exLon0...']".

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

attachEdgeClick

Attaches event handler fnFunction to the edgeClick event of this sap.ui.vbm.Area.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Area itself.

This event is raised when the edge of an Area is clicked.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.vbm.Area itself

attachEdgeContextMenu

Attaches event handler fnFunction to the edgeContextMenu event of this sap.ui.vbm.Area.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Area itself.

This event is raised when the edge of an Area is right clicked.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.vbm.Area itself

detachEdgeClick

Detaches event handler fnFunction from the edgeClick event of this sap.ui.vbm.Area.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachEdgeContextMenu

Detaches event handler fnFunction from the edgeContextMenu event of this sap.ui.vbm.Area.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.vbm.Area.extend

Creates a new subclass of class sap.ui.vbm.Area 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.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

fireEdgeClick

Fires event edgeClick to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireEdgeContextMenu

Fires event edgeContextMenu to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getBorderDash

Gets current value of property borderDash.

Defines the dashing style of the area border using an array.

getColor

Gets current value of property color.

The fill color of the Area.

getColorBorder

Gets current value of property colorBorder.

The border color of the Area.

sap.ui.vbm.Area.getMetadata

Returns a metadata object for class sap.ui.vbm.Area.

getPosition

Gets current value of property position.

The position array for the Area. For single part areas the format is "lon0;lat0;0.0;...;lonN,latN,0.0". For multi part areas you need to provide an array of arrays of the above position string: "[['lon0...'],['lon0...']]" (sequence of single and double quotes is important). Single and Multi part areas must not be mixed within one Areas aggregation.
Finally each area part can have multiple exclusions/holes. In that case the position list of excluded areas has follow the list of the base shape: "['lon0...', 'exLon0...']".

setBorderDash

Sets a new value for property borderDash.

Defines the dashing style of the area border using an array.

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

Param Type DefaultValue Description
sBorderDash string

New value for property borderDash

setColor

Sets a new value for property color.

The fill color of the Area.

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

Param Type DefaultValue Description
sColor string

New value for property color

setColorBorder

Sets a new value for property colorBorder.

The border color of the Area.

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

Param Type DefaultValue Description
sColorBorder string

New value for property colorBorder

setPosition

Sets a new value for property position.

The position array for the Area. For single part areas the format is "lon0;lat0;0.0;...;lonN,latN,0.0". For multi part areas you need to provide an array of arrays of the above position string: "[['lon0...'],['lon0...']]" (sequence of single and double quotes is important). Single and Multi part areas must not be mixed within one Areas aggregation.
Finally each area part can have multiple exclusions/holes. In that case the position list of excluded areas has follow the list of the base shape: "['lon0...', 'exLon0...']".

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

Param Type DefaultValue Description
sPosition string

New value for property position