GeoJsonLayer aggregation container. A GeoJsonLayer 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 GeoJsonLayer.
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.GeoJsonLayer(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 |
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 |
---|---|
addData |
Add GeoJSON object to the layer |
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.GeoJsonLayer.extend |
Creates a new subclass of class sap.ui.vbm.GeoJsonLayer with name
|
fireClick |
Fires event click to attached listeners. |
fireContextMenu |
Fires event contextMenu to attached listeners. |
getData |
Gets current value of property data. GeoJSON object according to the http://geojson.org/geojson-spec.html#geojson-objects|specification
|
getDefaultBorderColor |
Gets current value of property defaultBorderColor. Default border color for GeoJSON features, if applicable (Polygons and LineStrings) Default value is |
getDefaultFillColor |
Gets current value of property defaultFillColor. Default Fill color for GeoJSON features (Polygons and LineStrings) Default value is |
getDefaultLineWidth |
Gets current value of property defaultLineWidth. Default line width for LineStrings Default value is |
getFeaturesInfo |
Returns Properties for Features like name, bounding box, and midpoint |
getItems |
Gets content of aggregation items. Feature object aggregation |
sap.ui.vbm.GeoJsonLayer.getMetadata |
Returns a metadata object for class sap.ui.vbm.GeoJsonLayer. |
getSrcURL |
Gets current value of property srcURL. Source URL for GeoJSON |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
openContextMenu |
open the context menu |
openDetailWindow |
open a Detail Window |
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. |
setData |
Sets a new value for property data. GeoJSON object according to the http://geojson.org/geojson-spec.html#geojson-objects|specification
When called with a value of |
setDefaultBorderColor |
Sets a new value for property defaultBorderColor. Default border color for GeoJSON features, if applicable (Polygons and LineStrings) When called with a value of Default value is |
setDefaultFillColor |
Sets a new value for property defaultFillColor. Default Fill color for GeoJSON features (Polygons and LineStrings) When called with a value of Default value is |
setDefaultLineWidth |
Sets a new value for property defaultLineWidth. Default line width for LineStrings When called with a value of Default value is |
setSrcURL |
Sets a new value for property srcURL. Source URL for GeoJSON When called with a value of |
Add GeoJSON object to the layer
Param | Type | DefaultValue | Description |
---|---|---|---|
aData | object |
GeoJSON object or an array of those |
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.GeoJsonLayer
.
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.GeoJsonLayer
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.GeoJsonLayer
.
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.GeoJsonLayer
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.GeoJsonLayer
.
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.GeoJsonLayer
.
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.GeoJsonLayer 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.core.Element.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 |
Gets current value of property data.
GeoJSON object according to the http://geojson.org/geojson-spec.html#geojson-objects|specification
or array of such objects
Gets current value of property defaultBorderColor.
Default border color for GeoJSON features, if applicable (Polygons and LineStrings)
Default value is "rgba(255, 255, 255, 1.0)"
.
Gets current value of property defaultFillColor.
Default Fill color for GeoJSON features (Polygons and LineStrings)
Default value is "rgba(186, 193, 196, 0.5)"
.
Gets current value of property defaultLineWidth.
Default line width for LineStrings
Default value is 5
.
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. |
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 |
open the context menu
Param | Type | DefaultValue | Description |
---|---|---|---|
oFeature | sap.ui.vbm.Feature |
VO instance for which the Detail Window should be opened |
|
oMenu | object |
the context menu to be opened |
open a Detail Window
Param | Type | DefaultValue | Description |
---|---|---|---|
oFeature | sap.ui.vbm.Feature |
VO instance for which the Detail Window should be opened |
|
oParams | object |
Parameter object |
|
caption | string |
Text for Detail Window caption |
|
offsetX | string |
position offset in x-direction from the anchor point |
|
offsetY | string |
position offset in y-direction from the anchor point |
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 |
Sets a new value for property data.
GeoJSON object according to the http://geojson.org/geojson-spec.html#geojson-objects|specification
or array of such objects
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
New value for property |
Sets a new value for property defaultBorderColor.
Default border color for GeoJSON features, if applicable (Polygons and LineStrings)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(255, 255, 255, 1.0)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDefaultBorderColor | sap.ui.core.CSSColor | "rgba(255, 255, 255, 1.0)" |
New value for property |
Sets a new value for property defaultFillColor.
Default Fill color for GeoJSON features (Polygons and LineStrings)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "rgba(186, 193, 196, 0.5)"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDefaultFillColor | sap.ui.core.CSSColor | "rgba(186, 193, 196, 0.5)" |
New value for property |
Sets a new value for property defaultLineWidth.
Default line width for LineStrings
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 5
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iDefaultLineWidth | int | 5 |
New value for property |
Sets a new value for property srcURL.
Source URL for GeoJSON
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSrcURL | string |
New value for property |