public class MapFragment
extends androidx.fragment.app.Fragment
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MAP_DYNAMIC_KEY
Key used to store dynamic keys set in Bundle when creating fragment.
|
static java.lang.String |
STYLE_URL_KEY
Key used to store style URL in Bundle when creating fragment.
|
| Constructor and Description |
|---|
MapFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
getAsyncMap(OnMapReadyCallback callback)
Sets a callback which will be triggered when the map instance is ready to use.
|
static MapFragment |
newInstance()
Create new instance of MapFragment.
|
static MapFragment |
newInstance(java.util.HashMap<java.lang.String,java.lang.String> keys)
Deprecated.
|
static MapFragment |
newInstance(java.util.HashMap<java.lang.String,java.lang.String> keys,
java.lang.String styleUrl)
Deprecated.
|
static MapFragment |
newInstance(MapProperties mapProperties)
Create new instance of MapFragment with desired initial properties.
|
static MapFragment |
newInstance(java.lang.String styleUrl)
Deprecated.
|
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onCreate(android.os.Bundle savedInstanceState) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
void |
onPause() |
void |
onResume() |
void |
onSaveInstanceState(@NotNull android.os.Bundle outState) |
void |
onStart() |
void |
onStop() |
protected void |
parseAttrs(android.content.Context context,
android.util.AttributeSet attrs) |
void |
setMapBackgroundColor(int mapBackgroundColor)
Set map background color
|
void |
setZOrderMediaOverlay(boolean zOrderOnTop)
Control whether the map surface view's surface is placed on top of another regular surface view
in the window (but still behind the window itself).
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireContext, requireFragmentManager, requireHost, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenupublic static final java.lang.String STYLE_URL_KEY
public static final java.lang.String MAP_DYNAMIC_KEY
public void setMapBackgroundColor(int mapBackgroundColor)
@NonNull public static MapFragment newInstance()
@NonNull
@Deprecated
@DeprecatedSince(year=2020,
month=2)
public static MapFragment newInstance(java.util.HashMap<java.lang.String,java.lang.String> keys)
keys - map containing api key values for "OnlineMaps.Key" & "OnlineTraffic.Key"@NonNull
@Deprecated
@DeprecatedSince(year=2020,
month=2)
public static MapFragment newInstance(java.lang.String styleUrl)
@NonNull
@Deprecated
@DeprecatedSince(year=2020,
month=2)
public static MapFragment newInstance(java.util.HashMap<java.lang.String,java.lang.String> keys,
java.lang.String styleUrl)
keys - map containing api key values for "OnlineMaps.Key" & "OnlineTraffic.Key"styleUrl - @NonNull public static MapFragment newInstance(MapProperties mapProperties)
mapProperties - initial map propertiespublic void onCreate(@Nullable
android.os.Bundle savedInstanceState)
onCreate in class androidx.fragment.app.Fragmentpublic void onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState)
onInflate in class androidx.fragment.app.Fragmentpublic android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class androidx.fragment.app.Fragmentpublic void onStart()
onStart in class androidx.fragment.app.Fragmentpublic void onResume()
onResume in class androidx.fragment.app.Fragmentpublic void onPause()
onPause in class androidx.fragment.app.Fragmentpublic void onStop()
onStop in class androidx.fragment.app.Fragmentpublic void onDestroy()
onDestroy in class androidx.fragment.app.Fragmentpublic void onSaveInstanceState(@NotNull
@NotNull android.os.Bundle outState)
onSaveInstanceState in class androidx.fragment.app.Fragmentpublic void onActivityCreated(@Nullable
android.os.Bundle savedInstanceState)
onActivityCreated in class androidx.fragment.app.Fragmentpublic void getAsyncMap(@NonNull
OnMapReadyCallback callback)
callback - The callback to handle the result.public void setZOrderMediaOverlay(boolean zOrderOnTop)
protected void parseAttrs(android.content.Context context,
android.util.AttributeSet attrs)