public class GlobeMapFragment extends androidx.fragment.app.Fragment implements MapController.GestureDelegate, GlobeController.GestureDelegate
| Modifier and Type | Class and Description |
|---|---|
static class |
GlobeMapFragment.MapDisplayType |
| Modifier and Type | Field and Description |
|---|---|
protected BaseController |
baseControl |
protected GlobeController |
globeControl |
protected GlobeController.Settings |
globeSettings |
protected MapController |
mapControl |
protected GlobeMapFragment.MapDisplayType |
mapDisplayType |
protected MapController.Settings |
mapSettings |
| Constructor and Description |
|---|
GlobeMapFragment() |
| Modifier and Type | Method and Description |
|---|---|
protected GlobeMapFragment.MapDisplayType |
chooseDisplayType()
Override this to tell the fragment you want either a map or a globe.
|
protected void |
controlHasStarted()
Override this to be called when the control is up and running.
|
void |
globeDidMove(GlobeController globeControl,
Point3d[] corners,
boolean userMotion)
Called for every single visible frame of movement.
|
void |
globeDidStartMoving(GlobeController globeControl,
boolean userMotion)
Called when the globe first starts moving.
|
void |
globeDidStopMoving(GlobeController globeControl,
Point3d[] corners,
boolean userMotion)
Called when the globe stops moving.
|
java.lang.String |
loadLibraryName()
Override this if you've got a different name for the core WG-Maply library.
|
void |
mapDidMove(MapController mapControl,
Point3d[] corners,
boolean userMotion)
Called for every single visible frame of movement.
|
void |
mapDidStartMoving(MapController mapControl,
boolean userMotion)
Called when the map first starts moving.
|
void |
mapDidStopMoving(MapController mapControl,
Point3d[] corners,
boolean userMotion)
Called when the map stops moving.
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle inState)
This is the standard onCreateView() for the fragment.
|
void |
onDestroy() |
void |
onDestroyView()
This is the standard fragment onDestroyView().
|
void |
onPause() |
void |
onResume() |
void |
onSaveInstanceState(android.os.Bundle outState)
The standard fragment onSaveInstanceState().
|
void |
onViewStateRestored(android.os.Bundle inState)
The standard fragment onRestoreInstanceState().
|
protected void |
preControlCreated()
Override this to be called right before the map or globe is created.
|
void |
userDidLongPress(GlobeController globeControl,
SelectedObject[] selObjs,
Point2d loc,
Point2d screenLoc)
The user did long press somewhere, there might be an object
|
void |
userDidLongPress(MapController mapController,
SelectedObject[] selObjs,
Point2d loc,
Point2d screenLoc)
The user long pressed somewhere, either on a selectable object or nor
|
void |
userDidSelect(GlobeController globeControl,
SelectedObject[] selObjs,
Point2d loc,
Point2d screenLoc)
The user selected the given object.
|
void |
userDidSelect(MapController mapControl,
SelectedObject[] selObjs,
Point2d loc,
Point2d screenLoc)
The user selected the given object.
|
void |
userDidTap(GlobeController globeControl,
Point2d loc,
Point2d screenLoc)
The user tapped somewhere, but not on a selectable object.
|
void |
userDidTap(MapController mapControl,
Point2d loc,
Point2d screenLoc)
The user tapped somewhere, but not on a selectable object.
|
void |
userDidTapOutside(GlobeController globeControl,
Point2d screenLoc)
The user tapped outside the globe.
|
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, onActivityCreated, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onStart, onStop, onViewCreated, 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, unregisterForContextMenuprotected MapController mapControl
protected GlobeController globeControl
protected BaseController baseControl
protected GlobeMapFragment.MapDisplayType mapDisplayType
protected GlobeController.Settings globeSettings
protected MapController.Settings mapSettings
protected GlobeMapFragment.MapDisplayType chooseDisplayType()
public java.lang.String loadLibraryName()
protected void preControlCreated()
protected void controlHasStarted()
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle inState)
onCreateView in class androidx.fragment.app.Fragmentpublic void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState in class androidx.fragment.app.Fragmentpublic void onViewStateRestored(android.os.Bundle inState)
onViewStateRestored in class androidx.fragment.app.FragmentinState - public void onPause()
onPause in class androidx.fragment.app.Fragmentpublic void onResume()
onResume in class androidx.fragment.app.Fragmentpublic void onDestroyView()
onDestroyView in class androidx.fragment.app.Fragmentpublic void onDestroy()
onDestroy in class androidx.fragment.app.Fragmentpublic void userDidSelect(MapController mapControl, SelectedObject[] selObjs, Point2d loc, Point2d screenLoc)
userDidSelect in interface MapController.GestureDelegatemapControl - The maply controller this is associated with.selObjs - The objects the user selected (e.g. MaplyScreenMarker).loc - The location they tapped on. This is in radians.screenLoc - The location on the OpenGL surface.public void userDidTap(MapController mapControl, Point2d loc, Point2d screenLoc)
userDidTap in interface MapController.GestureDelegatemapControl - The maply controller this is associated with.loc - The location they tapped on. This is in radians.screenLoc - The location on the OpenGL surface.public void userDidLongPress(MapController mapController, SelectedObject[] selObjs, Point2d loc, Point2d screenLoc)
userDidLongPress in interface MapController.GestureDelegatemapController - The maply controller this is associated with.selObjs - The objects (e.g. MaplyScreenMarker) that the user long pressed or null if there was noneloc - The location they tapped on. This is in radians.screenLoc - The location on the OpenGL surface.public void mapDidStartMoving(MapController mapControl, boolean userMotion)
mapDidStartMoving in interface MapController.GestureDelegatemapControl - The map controller this is associated with.userMotion - Set if the motion was caused by a gesture.public void mapDidStopMoving(MapController mapControl, Point3d[] corners, boolean userMotion)
mapDidStopMoving in interface MapController.GestureDelegatemapControl - The map controller this is associated with.corners - Corners of the viewport. If one of them is null, that means it doesn't land anywhere valid.userMotion - Set if the motion was caused by a gesture.public void mapDidMove(MapController mapControl, Point3d[] corners, boolean userMotion)
mapDidMove in interface MapController.GestureDelegatemapControl - The map controller this is associated with.corners - Corners of the viewport. If one of them is null, that means it doesn't land anywhere valid.userMotion - Set if the motion was caused by a gesture.public void userDidSelect(GlobeController globeControl, SelectedObject[] selObjs, Point2d loc, Point2d screenLoc)
userDidSelect in interface GlobeController.GestureDelegateglobeControl - The maply controller this is associated with.selObjs - The objects the user selected (e.g. MaplyScreenMarker).loc - The location they tapped on. This is in radians.screenLoc - The location on the OpenGL surface.public void userDidTap(GlobeController globeControl, Point2d loc, Point2d screenLoc)
userDidTap in interface GlobeController.GestureDelegateglobeControl - The maply controller this is associated with.loc - The location they tapped on. This is in radians. If null, then the user tapped outside the globe.screenLoc - The location on the OpenGL surface.public void userDidTapOutside(GlobeController globeControl, Point2d screenLoc)
userDidTapOutside in interface GlobeController.GestureDelegateglobeControl - The maply controller this is associated with.screenLoc - The location on the OpenGL surface.public void userDidLongPress(GlobeController globeControl, SelectedObject[] selObjs, Point2d loc, Point2d screenLoc)
userDidLongPress in interface GlobeController.GestureDelegateglobeControl - The maply controller this is associated with.selObjs - The objects the user selected (e.g. MaplyScreenMarker) or null if there was no object.loc - The location they tapped on. This is in radians. If null, then the user tapped outside the globe.screenLoc - The location on the OpenGL surface.public void globeDidStartMoving(GlobeController globeControl, boolean userMotion)
globeDidStartMoving in interface GlobeController.GestureDelegateglobeControl - The globe controller this is associated with.userMotion - Set if the motion was caused by a gesture.public void globeDidStopMoving(GlobeController globeControl, Point3d[] corners, boolean userMotion)
globeDidStopMoving in interface GlobeController.GestureDelegateglobeControl - The globe controller this is associated with.corners - Corners of the viewport. If one of them is null, that means it doesn't land on the globe.userMotion - Set if the motion was caused by a gesture.public void globeDidMove(GlobeController globeControl, Point3d[] corners, boolean userMotion)
globeDidMove in interface GlobeController.GestureDelegateglobeControl - The globe controller this is associated with.corners - Corners of the viewport. If one of them is null, that means it doesn't land on the globe.userMotion - Set if the motion was caused by a gesture.