public abstract class

MapActionProvider

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.maps.MapActionProvider

Class Overview

An abstract class to handle actions from the toolbar. This class should not be used directly but instead implemented in a map specific class.

See Also

Summary

Constants
String DEFAULT_LAYER
int EARTH_RADIUS
Public Constructors
MapActionProvider()
Public Methods
abstract void addCircle(FioriCircleOptions circleOptions)
abstract void addMarker(FioriMarkerOptions markerOptions)
Add a marker to the map.
abstract void addPolygon(FioriPolygonOptions polygonOptions)
abstract void addPolyline(FioriPolylineOptions polylineOptions)
abstract void clear()
abstract void cluster()
Forces the map to cluster, e.g.
abstract void deleteCircle(FioriCircleOptions circleOptions)
abstract void deleteMarker(FioriMarkerOptions markerOptions)
Delete a marker from the map.
abstract void deletePolygon(FioriPolygonOptions polygonOptions)
abstract void deletePolyline(FioriPolylineOptions polylineOptions)
abstract void doExtentsAction()
The action to be performed when the zoom extents button is tapped.
abstract void doLocationAction()
The action to be performed when the location button is tapped.
AnnotationInfoAdapter getAnnotationInfoAdapter()
Returns the AnnotationInfoAdapter to be used to show detailed information for an annotation.
MapViewModel getMapViewModel()
Returns the view model
abstract void hideLayer(String layer)
abstract void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
The activity showing the FioriMapView should call this method when its onRequestPermissionResult gets called.
abstract void selectMarker(FioriMarkerOptions markerOptions)
Select a given marker.
void setAnnotationInfoAdapter(AnnotationInfoAdapter annotationInfoAdapter)
Sets the AnnotationInfoAdapter to be used to show detailed information for an annotation.
abstract void setClustering(boolean clusteringEnabled)
This method sets whether the map will cluster markers that are very close together.
abstract void showLayer(String layer)
Protected Methods
void doLegendAction()
The action to be performed when the legend button is tapped.
abstract void removeLocation()
void setToolbar(OverlayToolbar toolbar)
Set the toolbar that is using this action provider.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String DEFAULT_LAYER

Constant Value: "default layer"

public static final int EARTH_RADIUS

Constant Value: 6378100 (0x00615274)

Public Constructors

public MapActionProvider ()

Public Methods

public abstract void addCircle (FioriCircleOptions circleOptions)

public abstract void addMarker (FioriMarkerOptions markerOptions)

Add a marker to the map.

Parameters
markerOptions Provide position and other options for the map marker.

public abstract void addPolygon (FioriPolygonOptions polygonOptions)

public abstract void addPolyline (FioriPolylineOptions polylineOptions)

public abstract void clear ()

public abstract void cluster ()

Forces the map to cluster, e.g. after a new marker is added or removed.

public abstract void deleteCircle (FioriCircleOptions circleOptions)

public abstract void deleteMarker (FioriMarkerOptions markerOptions)

Delete a marker from the map.

Parameters
markerOptions the marker to delete.

public abstract void deletePolygon (FioriPolygonOptions polygonOptions)

public abstract void deletePolyline (FioriPolylineOptions polylineOptions)

public abstract void doExtentsAction ()

The action to be performed when the zoom extents button is tapped.

See Also

public abstract void doLocationAction ()

The action to be performed when the location button is tapped.

See Also

public AnnotationInfoAdapter getAnnotationInfoAdapter ()

Returns the AnnotationInfoAdapter to be used to show detailed information for an annotation.

public MapViewModel getMapViewModel ()

Returns the view model

public abstract void hideLayer (String layer)

public abstract void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)

The activity showing the FioriMapView should call this method when its onRequestPermissionResult gets called. If the map needs to show the current location but doesn't have permission it will request permission. This callback allows it to show the location after permission has been granted (instead of requiring the show-location action to be done again).

Parameters
requestCode Should be passed from the Activity's onRequestPermissionsResult.
permissions Should be passed from the Activity's onRequestPermissionsResult.
grantResults Should be passed from the Activity's onRequestPermissionsResult.

public abstract void selectMarker (FioriMarkerOptions markerOptions)

Select a given marker.

Parameters
markerOptions the marker to select.

public void setAnnotationInfoAdapter (AnnotationInfoAdapter annotationInfoAdapter)

Sets the AnnotationInfoAdapter to be used to show detailed information for an annotation.

public abstract void setClustering (boolean clusteringEnabled)

This method sets whether the map will cluster markers that are very close together.

Parameters
clusteringEnabled True means markers will be clustered, false means they will not be clustered.

public abstract void showLayer (String layer)

Protected Methods

protected void doLegendAction ()

The action to be performed when the legend button is tapped.

See Also

protected abstract void removeLocation ()

protected void setToolbar (OverlayToolbar toolbar)

Set the toolbar that is using this action provider.

Parameters
toolbar The toolbar that is using this action provider.