public abstract class

FioriMapView

extends CoordinatorLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ androidx.coordinatorlayout.widget.CoordinatorLayout
         ↳ com.sap.cloud.mobile.fiori.maps.FioriMapView<T>

Class Overview

A map implementation independent view, that allows the presentation of maps, map specific toolbars, editing of graphic elements (points, polylines, and polygons), with customizable views of settings, search results, and details.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
Fields
protected EditorView mEditorView
protected boolean mIsEditable
protected FrameLayout mMapContainer
protected MapViewModel mMapViewModel
protected OverlayToolbar mToolbar
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
FioriMapView(Context context)
FioriMapView(Context context, AttributeSet attrs)
Public Methods
void enterSearchMode()
Enters search mode.
void exitSearchMode()
Exits search mode.
EditorView getEditorView()
Get the view used for map editing.
abstract <T> T getMap()
Get the underlying map used in this view.
Point getMapCenterFor(Point point)
Returns the map center point to view the given
MapListPanel getMapListPanel()
Returns the MapListPanel instance.
MapViewModel getMapViewModel()
Get the view model used for this view.
View getPanelContent()
Returns the content view that's showing inside the panel
OverlayToolbar getToolbar()
Get the toolbar for the map view.
void hideContentPanel()
Hides the content panel
boolean isClusteringEnabled()
Check if marker clustering is enabled.
boolean isEditable()
Check if currently editing.
void setClusteringEnabled(boolean enabled)
Enable or disable marker clustering.
void setDefaultPanelContent(View view)
Sets the default view to be shown in sheet panel.
void setEditable(boolean editable)
Start or stop editing.
void setGeometryItems(List<CharSequence> geometryItems)
void setMapViewModel(MapViewModel mapViewModel)
Set the view model for this view.
void setPanelContent(View view)
Set the view to be used when presenting details.
void setSettingsView(View view)
Set the view to be used when presenting settings.
void showContentPanel(boolean fullScreen)
Shows the content panel
abstract void showPoint(Point point)
Pans camera when necessary to show the specified point if it's covered by the map panel
Protected Methods
boolean hiddenBySheet(Point point)
Whether the given point is hidden by the (half) expanded sheet
void onRestoreInstanceState(Parcelable state)
Parcelable onSaveInstanceState()
abstract void panCameraWhenNecessary()
Pans camera when necessary to show the selected marker
abstract void restoreMarkerSelection()
Restores marker selection and panel content after rotation
void setMapView(int resourceId)
void setMapView(View view)
void showSettingsView()
[Expand]
Inherited Methods
From class androidx.coordinatorlayout.widget.CoordinatorLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface androidx.core.view.NestedScrollingParent
From interface androidx.core.view.NestedScrollingParent2
From interface androidx.core.view.NestedScrollingParent3

Fields

protected EditorView mEditorView

protected boolean mIsEditable

protected FrameLayout mMapContainer

protected MapViewModel mMapViewModel

protected OverlayToolbar mToolbar

Public Constructors

public FioriMapView (Context context)

public FioriMapView (Context context, AttributeSet attrs)

Public Methods

public void enterSearchMode ()

Enters search mode. Magnifying glass icon becomes arrow which allows cancelling search

public void exitSearchMode ()

Exits search mode.

public EditorView getEditorView ()

Get the view used for map editing.

Returns
  • the view used for map editing.

public abstract T getMap ()

Get the underlying map used in this view.

Returns
  • the underlying map used in this view.

public Point getMapCenterFor (Point point)

Returns the map center point to view the given

Parameters
point visual point

public MapListPanel getMapListPanel ()

Returns the MapListPanel instance.

public MapViewModel getMapViewModel ()

Get the view model used for this view.

Returns
  • the view model used for this view.

public View getPanelContent ()

Returns the content view that's showing inside the panel

public OverlayToolbar getToolbar ()

Get the toolbar for the map view.

Returns
  • the toolbar for the map view.

public void hideContentPanel ()

Hides the content panel

public boolean isClusteringEnabled ()

Check if marker clustering is enabled.

Returns
  • true if clustering is enabled.

public boolean isEditable ()

Check if currently editing.

Returns
  • true if currently editing.

public void setClusteringEnabled (boolean enabled)

Enable or disable marker clustering.

Parameters
enabled enables marker clustering when true.

public void setDefaultPanelContent (View view)

Sets the default view to be shown in sheet panel.

public void setEditable (boolean editable)

Start or stop editing.

Parameters
editable start editing when true.

public void setGeometryItems (List<CharSequence> geometryItems)

public void setMapViewModel (MapViewModel mapViewModel)

Set the view model for this view.

Parameters
mapViewModel the view model for this view.

public void setPanelContent (View view)

Set the view to be used when presenting details. The view and it's content are determined by the developer. The view can be show and hidden by tapping the button to the right of the search bar. When the device is in portrait mode, the view will appear on the bottom sheet. In landscape, it will be on the left or full screen, depending on the size of the device.

Parameters
view the view to be used when presenting details; If null, default panel content will be used; if default panel is also null, an empty view will be used.

public void setSettingsView (View view)

Set the view to be used when presenting settings. The view will be presented when the user taps the setting button on the toolbar.

Parameters
view the view to be used when presenting settings.

public void showContentPanel (boolean fullScreen)

Shows the content panel

Parameters
fullScreen force full screen mode

public abstract void showPoint (Point point)

Pans camera when necessary to show the specified point if it's covered by the map panel

Parameters
point screen point

Protected Methods

protected boolean hiddenBySheet (Point point)

Whether the given point is hidden by the (half) expanded sheet

protected void onRestoreInstanceState (Parcelable state)

protected Parcelable onSaveInstanceState ()

protected abstract void panCameraWhenNecessary ()

Pans camera when necessary to show the selected marker

protected abstract void restoreMarkerSelection ()

Restores marker selection and panel content after rotation

protected void setMapView (int resourceId)

protected void setMapView (View view)

protected void showSettingsView ()