ConsumerController

public interface ConsumerController

Controls ridesharing features associated with ConsumerMapFragment. When the Fragment is destroyed, your app should remove all references to this class.

Nested Class Summary

class ConsumerController.OnConsumerMarkerClickCallback Callback invoked when an SDK marker is clicked or tapped. 

Public Method Summary

abstract Session
getActiveSession()
Returns the session that is currently showing.
abstract CameraUpdate
getCameraUpdate()
Returns the CameraUpdate used to position the map if autocamera is enabled.
abstract ConsumerMapStyle
getConsumerMapStyle()
Returns methods for customizing UI elements managed by ConsumerMapFragment.
abstract void
hideAllSessions()
Hides any session that is currently showing.
abstract boolean
isAutoCameraEnabled()
Returns a boolean value that indicates whether the camera is set to automatically center and/or zoom.
abstract void
setAutoCameraEnabled(boolean enable)
Sets the camera to automatically center and/or zoom when a session is active.
abstract void
setOnConsumerMarkerClickCallback(ConsumerController.OnConsumerMarkerClickCallback callback)
Sets the callback that is invoked when a marker is clicked.
abstract void
showSession(Session session)
Shows the requested session.

Public Methods

public abstract Session getActiveSession ()

Returns the session that is currently showing.

public abstract CameraUpdate getCameraUpdate ()

Returns the CameraUpdate used to position the map if autocamera is enabled. Returns null if there is no active session.

public abstract ConsumerMapStyle getConsumerMapStyle ()

Returns methods for customizing UI elements managed by ConsumerMapFragment.

public abstract void hideAllSessions ()

Hides any session that is currently showing.

public abstract boolean isAutoCameraEnabled ()

Returns a boolean value that indicates whether the camera is set to automatically center and/or zoom.

public abstract void setAutoCameraEnabled (boolean enable)

Sets the camera to automatically center and/or zoom when a session is active.

public abstract void setOnConsumerMarkerClickCallback (ConsumerController.OnConsumerMarkerClickCallback callback)

Sets the callback that is invoked when a marker is clicked.

public abstract void showSession (Session session)

Shows the requested session. The camera will initially zoom to the calculated zoom level, but autocamera settings will not change.