public class

SteerpathMapFragment

extends Fragment
java.lang.Object
   ↳ Fragment
     ↳ com.steerpath.sdk.maps.SteerpathMapFragment

Class Overview

SteerpathMapFragment is a wrapper for SteerpathMapView.

A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs. Being a fragment, this component can be added to an activity's layout or can dynamically be added using a FragmentManager.

SteerpathMapFragment makes runtime permission checks for API level > 22.

To get a reference to the SteerpathMapView, your Activity or Parent Activity must implement SteerpathMapFragment.MapViewListener

If Parent Activity implements the callback use ChildFragmentManager instead of SupportFragmentManager.

Summary

Nested Classes
interface SteerpathMapFragment.MapViewListener SteerpathMapFragment-to-Activity communication channel. 
Public Constructors
SteerpathMapFragment()
Public Methods
static SteerpathMapFragment newInstance()
Creates default SteerpathMapFragment instance
static SteerpathMapFragment newInstance(SteerpathMapOptions mapOptions)
Creates SteerpathMapFragment instance
void onAttach(Context context)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Creates the fragment view hierarchy.
void onDestroyView()
Called when the fragment is view hierarchy is being destroyed.
void onLowMemory()
Called when the fragment receives onLowMemory call from the hosting Activity.
void onPause()
Called when the fragment is pausing.
void onResume()
Called when the fragment is ready to be interacted with.
void onSaveInstanceState(Bundle outState)
Called when the fragment state needs to be saved.
void onStart()
Called whe fragment is about to be visible.
void onStop()
Called when fragment is going away.
void onViewCreated(View view, Bundle savedInstanceState)
Called when the fragment view hierarchy is created.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SteerpathMapFragment ()

Public Methods

public static SteerpathMapFragment newInstance ()

Creates default SteerpathMapFragment instance

public static SteerpathMapFragment newInstance (SteerpathMapOptions mapOptions)

Creates SteerpathMapFragment instance

Parameters
mapOptions The configuration options to be used.
Returns
  • created SteerpathMapFragment
Throws
IllegalArgumentException if null is given

public void onAttach (Context context)

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

Creates the fragment view hierarchy.

Parameters
inflater Inflater used to inflate content.
container The parent layout for the map fragment.
savedInstanceState The saved instance state for the map fragment.
Returns
  • The view created

public void onDestroyView ()

Called when the fragment is view hierarchy is being destroyed.

See Also
  • https://github.com/mapbox/mapbox-gl-native/issues/10809

public void onLowMemory ()

Called when the fragment receives onLowMemory call from the hosting Activity.

public void onPause ()

Called when the fragment is pausing.

public void onResume ()

Called when the fragment is ready to be interacted with.

public void onSaveInstanceState (Bundle outState)

Called when the fragment state needs to be saved.

Parameters
outState The saved state

public void onStart ()

Called whe fragment is about to be visible.

public void onStop ()

Called when fragment is going away.

public void onViewCreated (View view, Bundle savedInstanceState)

Called when the fragment view hierarchy is created.

Parameters
view The content view of the fragment
savedInstanceState THe saved instance state of the fragmentt