class sap.ui.vbm.AnalyticMap

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

The AnalyticMap control. This control renders a Map based on a GeoJSON source. The GeoJSON file is searched in the following places in the given sequence:

Further it is possible to specify a different URL by setting static attribute sap.ui.vbm.AnalyticMap.GeoJSONURL.
The Features from the GeoJSON get rendered as neutral background in gray. They are not active, but may report a name via tooltip. Each feature is expected to have a property id or id2, where as id2 should be an ISO country according to ISO 3166-2.
By adding Region elements to the regions aggregation it is possible to make feature from the GeoJSON interactive. Region elements need to match by ISO code.


Constructor

Constructor for a new AnalyticMap.

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.AnalyticMap(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

Borrowed Properties

Name Type Default Value Description
centerPosition string 0;0

Center position of the Map. Format is "<longitude>;<latitude>".

Visibility: public
clustering object Visibility: public
disablePan boolean false

Disable Map Paning. This setting works only upon initialization and cannot be changed later on.

Visibility: public
disableZoom boolean false

Disable Map Zooming. This setting works only upon initialization and cannot be changed later on.

Visibility: public
enableAnimation boolean false

Enable Animation of Map Zoom. Works in combination of setZoomlevel.

Visibility: public
initialPosition string 0;0;0

Initial position of the Map. Set is only supported on initialization! Format is "<longitude>;<latitude>;0".

Visibility: public
initialZoom string 2

Initial zoom. Value needs to be positive whole number. Set is only supported on initialization!

Visibility: public
legendVisible boolean true

Toggles the visibility of the legend

Visibility: public
mapConfiguration object

This is the map configuration for the geo map. The map configuration defines the used maps, the layering of the maps and the servers that can be used to request the map tiles.

Visibility: public
navcontrolVisible boolean true

Defines the visibility of the navigation control. Only supported on initialization!

Visibility: public
refMapLayerStack string Default

Name of the map layer stack (provided in mapConfiguration) which is used for map rendering. If not set the layer stack with the name 'Default' is chosen. Property can be changed at runtime to switch between map layer stack.

Visibility: public
scaleVisible boolean true

Defines the visibility of the scale. Only supported on initialization!

Visibility: public
visualFrame object

Visual Frame object. Defining a frame {minX, maxX, minY, maxY, maxLOD, minLOD} to which the scene display is restricted.

Visibility: public
zoomlevel int 2

Zoomlevel for the Map. Value needs to be positive whole number.

Visibility: public
allowKeyEventRepeat boolean true

Allow repeating of keyboard events when key is pressed and hold.

Visibility: public
ariaLabel string

Text to be read out for the Control when used in accessibility mode (Screen reader)

Visibility: public
config object Visibility: public
enableOverlappingTest boolean true

Enable Test for Overlapped Objects for selection and context menu

Visibility: public
height sap.ui.core.CSSSize 600px

Set the height of the control.

Visibility: public
keyEventDelay int 250

Miminum delay between keyboard events. Used to reduce frequency of keyboard events.

Visibility: public
lassoSelection boolean false

Defines whether the lasso selection mode is active or not

Visibility: public
plugin boolean false

When true, the ActiveX plugin version of Visual Business will be used for rendering. For that the plugin needs to be installed on the client. Default (false) the control renders on canvas.

Visibility: public
rectZoom boolean false

Defines whether the rectangular zoom mode is active or not

Visibility: public
rectangularSelection boolean false

Defines whether the rectangular selection mode is active or not

Visibility: public
width sap.ui.core.CSSSize 800px

Set the width of the control.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
regions 0..n sap.ui.vbm.Region

Regions that are different from the defaults. It is possible to specify the tooltip and color for regions. The region code must match the GeoJSON id2 identifier.

Borrowed Aggregations

Name Cardinality Type Description
clusters 0..n sap.ui.vbm.ClusterBase

Aggregation of clusters.

featureCollections 0..n sap.ui.vbm.FeatureCollection


Deprecated. This aggregation should not longer be used. Its functionality has been replaced by the more genericgeoJsonLayers aggregation.

geoJsonLayers 0..n sap.ui.vbm.GeoJsonLayer

Aggregation of GeoJSON layers. Object from a GeoJSON layer will be behind all other Visual Objects from the vos aggregation. In case of multiple GeoJSON layers the objects are orderer with the layers they belong to.

legend 0..1 sap.ui.vbm.Legend

Legend for the Map

resources 0..n sap.ui.vbm.Resource

Aggregation of resources. The images for e.g. Spots have to be provided as resources.

vos 0..n sap.ui.vbm.VoAbstract

Aggregation of visual object types. A VO aggregation can be considered to be a table of VOs of a common type.


Events Overview

Event Description
regionClick

The event is raised when there is a click or a tap on a region.

regionContextMenu

The event is raised when there is a right click or a tap and hold action on a region.

regionDeselect

Event is raised when regions get deselected

regionSelect

Raised when regions get selected

regionClick

The event is raised when there is a click or a tap on a region.

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

The regions code.

regionContextMenu

The event is raised when there is a right click or a tap and hold action on a region.

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

The regions code.

regionDeselect

Event is raised when regions get deselected

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

regionSelect

Raised when regions get selected

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

Methods Overview

Method Description
addRegion

Adds some region to the aggregation regions.

attachRegionClick

Attaches event handler fnFunction to the regionClick event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

The event is raised when there is a click or a tap on a region.

attachRegionContextMenu

Attaches event handler fnFunction to the regionContextMenu event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

The event is raised when there is a right click or a tap and hold action on a region.

attachRegionDeselect

Attaches event handler fnFunction to the regionDeselect event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

Event is raised when regions get deselected

attachRegionSelect

Attaches event handler fnFunction to the regionSelect event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

Raised when regions get selected

destroyRegions

Destroys all the regions in the aggregation regions.

detachRegionClick

Detaches event handler fnFunction from the regionClick event of this sap.ui.vbm.AnalyticMap.

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

detachRegionContextMenu

Detaches event handler fnFunction from the regionContextMenu event of this sap.ui.vbm.AnalyticMap.

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

detachRegionDeselect

Detaches event handler fnFunction from the regionDeselect event of this sap.ui.vbm.AnalyticMap.

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

detachRegionSelect

Detaches event handler fnFunction from the regionSelect event of this sap.ui.vbm.AnalyticMap.

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

sap.ui.vbm.AnalyticMap.extend

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

fireRegionClick

Fires event regionClick to attached listeners.

fireRegionContextMenu

Fires event regionContextMenu to attached listeners.

fireRegionDeselect

Fires event regionDeselect to attached listeners.

fireRegionSelect

Fires event regionSelect to attached listeners.

sap.ui.vbm.AnalyticMap.getMetadata

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

getRegions

Gets content of aggregation regions.

Regions that are different from the defaults. It is possible to specify the tooltip and color for regions. The region code must match the GeoJSON id2 identifier.

getRegionsInfo

Returns Infos for Regions like name, bounding box and midpoint

indexOfRegion

Checks for the provided sap.ui.vbm.Region in the aggregation regions. and returns its index if found or -1 otherwise.

insertRegion

Inserts a region into the aggregation regions.

removeAllRegions

Removes all the controls from the aggregation regions.

Additionally, it unregisters them from the hosting UIArea.

removeRegion

Removes a region from the aggregation regions.

zoomToRegions

Zoom to one ore more regions.

addRegion

Adds some region to the aggregation regions.

Param Type DefaultValue Description
oRegion sap.ui.vbm.Region

The region to add; if empty, nothing is inserted

attachRegionClick

Attaches event handler fnFunction to the regionClick event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

The event is raised when there is a click or a tap on a region.

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.AnalyticMap itself

attachRegionContextMenu

Attaches event handler fnFunction to the regionContextMenu event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

The event is raised when there is a right click or a tap and hold action on a region.

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.AnalyticMap itself

attachRegionDeselect

Attaches event handler fnFunction to the regionDeselect event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

Event is raised when regions get deselected

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.AnalyticMap itself

attachRegionSelect

Attaches event handler fnFunction to the regionSelect event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap itself.

Raised when regions get selected

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.AnalyticMap itself

destroyRegions

Destroys all the regions in the aggregation regions.

detachRegionClick

Detaches event handler fnFunction from the regionClick event of this sap.ui.vbm.AnalyticMap.

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

detachRegionContextMenu

Detaches event handler fnFunction from the regionContextMenu event of this sap.ui.vbm.AnalyticMap.

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

detachRegionDeselect

Detaches event handler fnFunction from the regionDeselect event of this sap.ui.vbm.AnalyticMap.

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

detachRegionSelect

Detaches event handler fnFunction from the regionSelect event of this sap.ui.vbm.AnalyticMap.

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.AnalyticMap.extend

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

fireRegionClick

Fires event regionClick to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

code string

The regions code.

fireRegionContextMenu

Fires event regionContextMenu to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

code string

The regions code.

fireRegionDeselect

Fires event regionDeselect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireRegionSelect

Fires event regionSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

sap.ui.vbm.AnalyticMap.getMetadata

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

getRegions

Gets content of aggregation regions.

Regions that are different from the defaults. It is possible to specify the tooltip and color for regions. The region code must match the GeoJSON id2 identifier.

getRegionsInfo

Returns Infos for Regions like name, bounding box and midpoint

Param Type DefaultValue Description
aCodes string[]

Array of region codes. The region code must match the geo json tag.

indexOfRegion

Checks for the provided sap.ui.vbm.Region in the aggregation regions. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oRegion sap.ui.vbm.Region

The region whose index is looked for

insertRegion

Inserts a region into the aggregation regions.

Param Type DefaultValue Description
oRegion sap.ui.vbm.Region

The region to insert; if empty, nothing is inserted

iIndex int

The 0-based index the region should be inserted at; for a negative value of iIndex, the region is inserted at position 0; for a value greater than the current size of the aggregation, the region is inserted at the last position

removeAllRegions

Removes all the controls from the aggregation regions.

Additionally, it unregisters them from the hosting UIArea.

removeRegion

Removes a region from the aggregation regions.

Param Type DefaultValue Description
vRegion int string sap.ui.vbm.Region

The region to remove or its index or id

zoomToRegions

Zoom to one ore more regions.

Param Type DefaultValue Description
aCodes string[]

Array of region codes. The region codes must match the geo json tags.

oCorr object

Correction for the calculated zoom factor. You can either a factor, the calculated zoom is multplied with or a array with pixels to be added as border in the sequence [left, top,right, bottom].