FeatureCollection aggregation container. A FeatureCollection can render the content of an assigned GeoJSON. The naming is associated to the GeoJSON standard. All features found in the GeoJSON are rendered as separated objects. From the possible feature types only
Constructor for a new FeatureCollection.
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.FeatureCollection(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 |
Name | Type | Default Value | Description |
---|---|---|---|
data | object | GeoJSON object according to the http://geojson.org/geojson-spec.html#geojson-objects|specification
|
|
defaultBorderColor | sap.ui.core.CSSColor | rgba(255, 255, 255, 1.0) | Default border color for GeoJSON features, if applicable (Polygons and LineStrings) Visibility: public |
defaultFillColor | sap.ui.core.CSSColor | rgba(186, 193, 196, 0.5) | Default Fill color for GeoJSON features (Polygons and LineStrings) Visibility: public |
defaultLineWidth | int | 5 | Default line width for LineStrings Visibility: public |
srcURL | string | Source URL for GeoJSON Visibility: public |
Default Aggregation: items
Name | Cardinality | Type | Description |
---|---|---|---|
items (default) | 0..n | sap.ui.vbm.Feature |
Feature object aggregation |
Name | Cardinality | Type | Description |
---|---|---|---|
items (default) | 0..n | sap.ui.vbm.Feature |
Feature object aggregation |
Event | Description |
---|---|
click |
The event is raised when there is a click action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored. |
contextMenu |
The event is raised when there is a right click or a tap and hold action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored. |
The event is raised when there is a click action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
featureId | string |
Id of clicked Feature |
The event is raised when there is a right click or a tap and hold action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
featureId | string |
Id of clicked Feature |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
attachClick |
Attaches event handler When called, the context of the event handler (its The event is raised when there is a click action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored. |
attachContextMenu |
Attaches event handler When called, the context of the event handler (its The event is raised when there is a right click or a tap and hold action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored. |
destroyItems |
Destroys all the items in the aggregation items. |
detachClick |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachContextMenu |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.vbm.FeatureCollection.extend |
Creates a new subclass of class sap.ui.vbm.FeatureCollection with name
|
fireClick |
Fires event click to attached listeners. |
fireContextMenu |
Fires event contextMenu to attached listeners. |
getFeaturesInfo |
Returns Properties for Features like name, bounding box, and midpoint |
getItems |
Gets content of aggregation items. Feature object aggregation |
sap.ui.vbm.FeatureCollection.getMetadata |
Returns a metadata object for class sap.ui.vbm.FeatureCollection. |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeItem |
Removes a item from the aggregation items. |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.vbm.Feature |
The item to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the click event of this sap.ui.vbm.FeatureCollection
.
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.FeatureCollection
itself.
The event is raised when there is a click action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored.
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 |
Attaches event handler fnFunction
to the contextMenu event of this sap.ui.vbm.FeatureCollection
.
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.FeatureCollection
itself.
The event is raised when there is a right click or a tap and hold action on an aggregated Feature. Clicks on other Features from the GeoJSON are ignored.
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 |
Detaches event handler fnFunction
from the click event of this sap.ui.vbm.FeatureCollection
.
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 |
Detaches event handler fnFunction
from the contextMenu event of this sap.ui.vbm.FeatureCollection
.
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 |
Creates a new subclass of class sap.ui.vbm.FeatureCollection 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.GeoJsonLayer.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 |
Fires event click to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
featureId | string |
Id of clicked Feature |
Fires event contextMenu to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
featureId | string |
Id of clicked Feature |
Returns Properties for Features like name, bounding box, and midpoint
Param | Type | DefaultValue | Description |
---|---|---|---|
aFeatureIds | string[] |
Array of Feature Ids. The Feature Id must match the GeoJSON tag. |
Returns a metadata object for class sap.ui.vbm.FeatureCollection.
Checks for the provided sap.ui.vbm.Feature
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.vbm.Feature |
The item whose index is looked for |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.vbm.Feature |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.ui.vbm.Feature |
The item to remove or its index or id |