On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

ConsumerMapFragment

Stay organized with collections Save and categorize content based on your preferences.
public class ConsumerMapFragment extends SupportMapFragment

Custom map view that changes its appearance based on the currently shown Session. Note that the top-level Activity MUST be FragmentActivity in order to support API 21 and earlier.

The associated ConsumerGoogleMap is returned in a callback registered in getConsumerGoogleMapAsync(ConsumerMapReadyCallback). The callback returns the ConsumerGoogleMap which provides access to Google Maps Android API for this view. The ConsumerController is then available by calling ConsumerGoogleMap.getConsumerController().

Public Constructor Summary

Public Method Summary

void
void
getMapAsync(OnMapReadyCallback onMapReadyCallback)
void
void
void
onViewCreated(View view, Bundle savedInstanceState)

Inherited Method Summary

Public Constructors

public ConsumerMapFragment ()

Public Methods

public void getConsumerGoogleMapAsync (ConsumerGoogleMap.ConsumerMapReadyCallback callback)

Access ConsumerController and ConsumerGoogleMap associated with this ConsumerMapFragment.

If the map is already available then the callback will be invoked immediately.

When this Fragment is destroyed, both ConsumerController and ConsumerGoogleMap should no longer be referenced to avoid memory leaks.

This call is idempotent and will return the same class instances.

Parameters
callback Callback to access ConsumerGoogleMap.

public void getMapAsync (OnMapReadyCallback onMapReadyCallback)

Parameters
onMapReadyCallback Will not be called.
Throws
UnsupportedGetMapAsyncException is thrown for all calls to this method.

public void onCreate (Bundle bundle)

Calls SupportMapFragment.onCreate(Bundle), and creates ConsumerController.

Subclasses that override onCreate(Bundle) must call this from within the override.

Parameters
bundle The bundle with the saved instance state.

public void onDestroy ()

Calls SupportMapFragment.onDestroy().

Subclasses that override onDestroy() must call this from within the override.

public void onViewCreated (View view, Bundle savedInstanceState)