Custom map view that changes its appearance based on the currently shown
Session.
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().
Inherited Field Summary
Public Constructor Summary
|
ConsumerMapFragment()
Creates a consumer map fragment.
|
Public Method Summary
| void | |
| void |
getMapAsync(OnMapReadyCallback onMapReadyCallback)
This method is unsupported, use
getConsumerGoogleMapAsync(ConsumerMapReadyCallback) to access a
ConsumerGoogleMap.
|
| static ConsumerMapFragment |
newInstance(GoogleMapOptions options)
Creates a consumer map fragment with the given options.
|
| void | |
| void | |
| void |
Inherited Method Summary
Public Constructors
public ConsumerMapFragment ()
Creates a consumer map fragment. This constructor is public only for use by an
inflater. Use
SupportMapFragment.newInstance() to create a ConsumerMapFragment
programmatically.
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)
This method is unsupported, use
getConsumerGoogleMapAsync(ConsumerMapReadyCallback) to access a
ConsumerGoogleMap.
Parameters
| onMapReadyCallback | Will not be called. |
|---|
Throws
| UnsupportedGetMapAsyncException | is thrown for all calls to this method. |
|---|
public static ConsumerMapFragment newInstance (GoogleMapOptions options)
Creates a consumer map fragment with the given options.
Parameters
| options | configuration GoogleMapOptions for a
GoogleMap, or null to use the default options. For
cloud-based maps styling, set the
GoogleMapOptions.mapId(String) value that corresponds to the specific
map style created in the Google Cloud console for this project. Note: cloud-based
maps styling is only supported with the
MapsInitializer.Renderer.LATEST renderer. |
|---|
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.