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:
- <server>:<port>/sap/bc/vbi/geojson/L0.json
- ./media/analyticmap/L0.json
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.
Event Summary
regionClick(oControlEvent)The event is raised when there is a click or a tap on a region. regionContextMenu(oControlEvent)The event is raised when there is a right click or a tap and hold action on a region. regionDeselect(oControlEvent)Event is raised when regions get deselected Method Summary
sap.ui.vbm.AnalyticMap.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vbm.AnalyticMap with name sClassName
and enriches it with the information contained in oClassInfo
. addRegion(oRegion)Adds some region to the aggregation regions
. attachRegionClick(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the regionClick
event of this sap.ui.vbm.AnalyticMap
. attachRegionContextMenu(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the regionContextMenu
event of this sap.ui.vbm.AnalyticMap
. attachRegionDeselect(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the regionDeselect
event of this sap.ui.vbm.AnalyticMap
. attachRegionSelect(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the regionSelect
event of this sap.ui.vbm.AnalyticMap
. detachRegionClick(fnFunction, oListener)Detaches event handler fnFunction
from the regionClick
event of this sap.ui.vbm.AnalyticMap
. detachRegionContextMenu(fnFunction, oListener)Detaches event handler fnFunction
from the regionContextMenu
event of this sap.ui.vbm.AnalyticMap
. detachRegionDeselect(fnFunction, oListener)Detaches event handler fnFunction
from the regionDeselect
event of this sap.ui.vbm.AnalyticMap
. detachRegionSelect(fnFunction, oListener)Detaches event handler fnFunction
from the regionSelect
event of this sap.ui.vbm.AnalyticMap
. getRegionsInfo(aCodes)Returns Infos for Regions like name, bounding box and midpoint indexOfRegion(oRegion)Checks for the provided sap.ui.vbm.Region
in the aggregation regions
. insertRegion(oRegion, iIndex)Inserts a region into the aggregation regions
. removeRegion(vRegion)Removes a region from the aggregation regions
. addCluster,
addFeatureCollection,
addGeoJsonLayer,
addResource,
addVo,
attachCenterChanged,
attachClick,
attachContextMenu,
attachDrop,
attachSelect,
attachZoomChanged,
closeAnyDetailWindow,
destroyClusters,
destroyFeatureCollections,
destroyGeoJsonLayers,
destroyLegend,
destroyResources,
destroyVos,
detachCenterChanged,
detachClick,
detachContextMenu,
detachDrop,
detachSelect,
detachZoomChanged,
fireCenterChanged,
fireClick,
fireContextMenu,
fireDrop,
fireSelect,
fireZoomChanged,
getCenterPosition,
getClustering,
getClusters,
getDisablePan,
getDisableZoom,
getEnableAnimation,
getFeatureCollections,
getGeoJsonLayers,
getInitialPosition,
getInitialZoom,
getLegend,
getLegendVisible,
getMapConfiguration,
getNavcontrolVisible,
getPositionInteractive,
getRefMapLayerStack,
getResources,
getScaleVisible,
getVisualFrame,
getVoByInternalId,
getVos,
getZoomlevel,
goToStartPosition,
indexOfCluster,
indexOfFeatureCollection,
indexOfGeoJsonLayer,
indexOfResource,
indexOfVo,
insertCluster,
insertFeatureCollection,
insertGeoJsonLayer,
insertResource,
insertVo,
openDetailWindow,
removeAllClusters,
removeAllFeatureCollections,
removeAllGeoJsonLayers,
removeAllResources,
removeAllVos,
removeCluster,
removeFeatureCollection,
removeGeoJsonLayer,
removeResource,
removeVo,
setCenterPosition,
setClustering,
setDisablePan,
setDisableZoom,
setEnableAnimation,
setInitialPosition,
setInitialZoom,
setLassoSelection,
setLegend,
setLegendVisible,
setMapConfiguration,
setNavcontrolVisible,
setRectangularSelection,
setRectZoom,
setRefMapLayerStack,
setScaleVisible,
setVisualFrame,
setZoomlevel addRenderItem,
attachChangeTrackingMode,
attachCloseWindow,
attachContainerCreated,
attachContainerDestroyed,
attachMove,
attachOpenWindow,
attachRender,
attachSubmit,
attachThumbnailClick,
attachZoom,
detachChangeTrackingMode,
detachCloseWindow,
detachContainerCreated,
detachContainerDestroyed,
detachMove,
detachOpenWindow,
detachRender,
detachSubmit,
detachThumbnailClick,
detachZoom,
fireChangeTrackingMode,
fireCloseWindow,
fireContainerCreated,
fireContainerDestroyed,
fireMove,
fireOpenWindow,
fireRender,
fireSubmit,
fireThumbnailClick,
fireZoom,
getConfig,
getHeight,
getInfoForCluster,
getLassoSelection,
getPicOfOverlay,
getPlugin,
getRectangularSelection,
getRectZoom,
getWidth,
load,
maximize,
minimize,
setConfig,
setHeight,
setPlugin,
setWidth,
zoomToAreas,
zoomToGeoPosition addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.ui.vbm.AnalyticMap(sId?, mSettings?)
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 for a general description of the syntax of the settings object.
The supported settings are:
- Aggregations
- Events
- regionClick : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- regionContextMenu : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- regionSelect : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- regionDeselect : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.vbm.GeoMap 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 |
Event Detail
regionClick(oControlEvent)
The event is raised when there is a click or a tap on a region.
Parameters:
regionContextMenu(oControlEvent)
The event is raised when there is a right click or a tap and hold action on a region.
Parameters:
regionDeselect(oControlEvent)
Event is raised when regions get deselected
Parameters:
regionSelect(oControlEvent)
Raised when regions get selected
Parameters:
Method Detail
sap.ui.vbm.AnalyticMap.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.
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 |
Returns a metadata object for class sap.ui.vbm.AnalyticMap.
Returns:
Adds some region to the aggregation regions
.
Parameters:
Returns:
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.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vbm.AnalyticMap itself |
Returns:
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.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vbm.AnalyticMap itself |
Returns:
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
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vbm.AnalyticMap itself |
Returns:
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
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vbm.AnalyticMap itself |
Returns:
Destroys all the regions in the aggregation regions
.
Returns:
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.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
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.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
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.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
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.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event
regionClick
to attached listeners.
Expects the following event parameters:
code
of type string
The regions code.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
regionContextMenu
to attached listeners.
Expects the following event parameters:
code
of type string
The regions code.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event regionDeselect
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event regionSelect
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
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.
Returns:
getRegionsInfo(aCodes): array
Returns Infos for Regions like name, bounding box and midpoint
Parameters:
{string[]} | aCodes | Array of region codes. The region code must match the geo json tag. |
Returns:
{array} | Array of Region Information Objects. Each object in the array has the properties BBox: Bounding Box for Region in format "lonMin;latMin;lonMax;latMax", Midpoint: Centerpoint for Region in format "lon;lat", Name: Name of the region, and Properties: Array of name-value-pair associated with the region |
indexOfRegion(oRegion): int
Checks for the provided sap.ui.vbm.Region
in the aggregation regions
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a region into the aggregation regions
.
Parameters:
{sap.ui.vbm.Region} | oRegion | the region to insert; if empty, nothing is inserted |
{int} | iIndex | 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 |
Returns:
Removes all the controls from the aggregation
regions
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a region from the aggregation regions
.
Parameters:
Returns:
zoomToRegions(aCodes, oCorr): void
Zoom to one ore more regions.
Parameters:
{string[]} | aCodes | Array of region codes. The region codes must match the geo json tags. |
{object} | oCorr | 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]. |