java.lang.Object | ||
↳ | androidx.lifecycle.ViewModel | |
↳ | com.sap.cloud.mobile.fiori.maps.MapViewModel |
An abstract data class for the toolbar. This class should not be used directly but instead implemented in a map specific class.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | LEGEND_DISPLAYED_BUNDLE |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MapViewModel() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | addLegendItemIfNecessary(LegendItemSource source, Context context) | ||||||||||
void |
clearData()
Clear the data members.
| ||||||||||
Collection<LegendItem> |
getLegendItems()
Get the collection of legend items for the toolbar.
| ||||||||||
String |
getLegendTitle()
Get the title for the legend.
| ||||||||||
FioriMarkerOptions | getSelectedMarkerOptions() | ||||||||||
boolean |
isLegendDisplayed()
Indicates if the legend is displayed.
| ||||||||||
boolean |
isLocationDisplayed()
Gets the state of whether the current location is being displayed.
| ||||||||||
void |
setLegendDisplayed(boolean legendDisplayed)
Set the legends displayed state.
| ||||||||||
boolean |
setLegendItemVisibility(String layer, boolean visible)
Given the name of the layer, this function updates the corresponding lengendItem.
| ||||||||||
void |
setLocationDisplayed(boolean isLocationDisplayed)
Save the state of whether the current location is being displayed.
| ||||||||||
void | setSelectedMarkerOptions(FioriMarkerOptions selectedMarkerOptions) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Clear the data members.
Get the collection of legend items for the toolbar.
Indicates if the legend is displayed. Useful for maintaining UI state when the activity has a configuration change, for example a device rotation. When the activity is recreated the legend can be redisplayed if it was visible before the rotation.
Gets the state of whether the current location is being displayed.
Set the legends displayed state.
legendDisplayed | true if the legend is currently displayed. |
---|
Given the name of the layer, this function updates the corresponding lengendItem.
layer | name of the layer |
---|---|
visible | true or false indicating the visibility to be set |
Save the state of whether the current location is being displayed.