java.lang.Object | ||
↳ | android.support.v4.app.Fragment | |
↳ | com.amazon.geo.mapsv2.SupportMapFragment |
Represents a Fragment
for displaying a map. Use this class if your
app is using the SupportLibrary. Otherwise, use MapFragment
.
Because this class is a Fragment
, it encompasses the View
of a
map and manages its life cycle.
If useViewLifecycleInFragment(boolean)
flag is
true
, the SupportMapFragment
is invalid when it is detached
from the Activity
, such as after calling the onDestroyView()
method. The SupportMapFragment
is usable after it is re-attached and
onCreateView(LayoutInflater, ViewGroup, Bundle)
is called.
Typically you add a SupportMapFragment
in the layout XML. For
example:
<fragment android:id="@+id/supportmapfragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.amazon.geo.mapsv2.SupportMapFragment" />
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public default constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
getMapAsync(OnMapReadyCallback) instead. The
callback of that method provides an AmazonMap
which is guaranteed to be non-null.
| |||||||||||
Get an
AmazonMap asynchronously with a callback after it is ready
to be used. | |||||||||||
Creates a new
SupportMapFragment object with the specified map
options. | |||||||||||
Creates a new
SupportMapFragment object with default options. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Public default constructor. Use newInstance()
or
newInstance(AmazonMapOptions)
to create a
SupportMapFragment
dynamically.
This method is deprecated.
Use getMapAsync(OnMapReadyCallback)
instead. The
callback of that method provides an AmazonMap
which is guaranteed to be non-null.
Gets the map object associated with this SupportMapFragment
.
This method returns null
if the map is not yet initialized
through onCreateView(LayoutInflater, ViewGroup, Bundle)
. Subsequent calls can return a valid
AmazonMap
object once the map is initialized.
This method also returns null
if the Amazon Maps API library is
not available on the device.
AmazonMap
object. Returns null
if the map has
not been initialized or if the Amazon Maps API library is not
available on the device.Get an AmazonMap
asynchronously with a callback after it is ready
to be used. The map provided to the callback is guaranteed to be
non-null.
This method must be called from the main thread. The callback will be invoked on the main thread.
callback | The callback to invoke when the map is ready to use. |
---|
Creates a new SupportMapFragment
object with the specified map
options.
options | An AmazonMapOptions object with the desired
initial map options. |
---|
SupportMapFragment
object.
Creates a new SupportMapFragment
object with default options.
SupportMapFragment
object.