Public Member Functions | |
void | onCreate (@Nullable Bundle savedInstanceState) |
View | onCreateView (@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) |
void | onInflate (final Context context, final AttributeSet attrs, final Bundle savedInstanceState) |
void | onSaveInstanceState (@NonNull final Bundle outState) |
void | onViewStateRestored (@Nullable final Bundle savedInstanceState) |
void | onStart () |
void | onResume () |
void | onPause () |
void | onStop () |
void | onDestroyView () |
void | onDestroy () |
void | onDetach () |
void | getMapAsync (final OnMapInitListener onMapInitListener) |
MapView | getMapView () |
MapView.MapDataModel | getMapDataModel () |
Camera.CameraModel | getCameraDataModel () |
Static Public Member Functions | |
static MapFragment | newInstance (final @GlSurfaceListenerFactory.Type int surfaceType) |
static MapFragment | newInstance (@Nullable final CameraState initialCameraState) |
static MapFragment | newInstance (@Nullable final List< String > mapSkins) |
static MapFragment | newInstance (final @GlSurfaceListenerFactory.Type int surfaceType, @Nullable final CameraState initialCameraState, @Nullable final List< String > initialSkins) |
Static Protected Member Functions | |
static< T extends MapFragment > T | newInstance (final Class< T > cls, final @GlSurfaceListenerFactory.Type int surfaceType, @Nullable final CameraState initialCameraState, @Nullable final List< String > initialSkins) |
A fragment class that automatically creates a Map.
Camera.CameraModel com.sygic.sdk.map.MapFragment.getCameraDataModel | ( | ) |
Implements com.sygic.sdk.map.data.MapDataProvider.
void com.sygic.sdk.map.MapFragment.getMapAsync | ( | final OnMapInitListener | onMapInitListener | ) |
onMapInitListener | Listener notified about map object changes Returns the map object when it is ready via OnMapInitListener |
MapView.MapDataModel com.sygic.sdk.map.MapFragment.getMapDataModel | ( | ) |
Called by MapView to obtain the model
Called after MapFragment is attached to Activity
Implements com.sygic.sdk.map.data.MapDataProvider.
MapView com.sygic.sdk.map.MapFragment.getMapView | ( | ) |
|
static |
Create new fragment and set initial camera state.
In initial camera state you can set values such as position, zoom and tilt for first map rendering. For all options see CameraState
initialCameraState | initial state of camera |
|
static |
Create new fragment and set initial map skins.
You can send a list of skins which will be applied to map during creation
mapSkins | initial skins |
|
static |
Create new fragment and set the gl surface type for creating OpenGL surface. This can be also set in xml via app:sygic_gl_surfaceType="TEXTURE_VIEW"
Available values for gl surface type are: GlSurfaceListenerFactory.Type#SURFACE_VIEW for android.view.SurfaceView GlSurfaceListenerFactory.Type#TEXTURE_VIEW for android.view.TextureView Default value is TEXTURE_VIEW.
surfaceType | Gl surface type for creating OpenGL surface |
|
static |
Create new fragment and set the gl surface type for creating OpenGL surface and initial camera state.
Available values for gl surface type are: GlSurfaceListenerFactory.Type#SURFACE_VIEW for android.view.SurfaceView GlSurfaceListenerFactory.Type#TEXTURE_VIEW for android.view.TextureView Default value is TEXTURE_VIEW.
In initial camera state you can set values such as position, zoom and tilt for first map rendering. For all options see CameraState
surfaceType | Gl surface type for creating OpenGL surface |
initialCameraState | initial state of camera |
|
staticprotected |
void com.sygic.sdk.map.MapFragment.onCreate | ( | @Nullable Bundle | savedInstanceState | ) |
View com.sygic.sdk.map.MapFragment.onCreateView | ( | @NonNull LayoutInflater | inflater, |
@Nullable ViewGroup | container, | ||
@Nullable Bundle | savedInstanceState | ||
) |
Called when this fragment is first attached to its Activity. Automatically starts to initialize the MapEngine for later use.
void com.sygic.sdk.map.MapFragment.onDestroy | ( | ) |
void com.sygic.sdk.map.MapFragment.onDestroyView | ( | ) |
Called when the view previously created by onCreateView(LayoutInflater, ViewGroup, Bundle) has been detached from this fragment. The MapView object created earlier will detach itself of its associated Map instance.
void com.sygic.sdk.map.MapFragment.onDetach | ( | ) |
void com.sygic.sdk.map.MapFragment.onInflate | ( | final Context | context, |
final AttributeSet | attrs, | ||
final Bundle | savedInstanceState | ||
) |
void com.sygic.sdk.map.MapFragment.onPause | ( | ) |
void com.sygic.sdk.map.MapFragment.onResume | ( | ) |
void com.sygic.sdk.map.MapFragment.onSaveInstanceState | ( | @NonNull final Bundle | outState | ) |
void com.sygic.sdk.map.MapFragment.onStart | ( | ) |
void com.sygic.sdk.map.MapFragment.onStop | ( | ) |
void com.sygic.sdk.map.MapFragment.onViewStateRestored | ( | @Nullable final Bundle | savedInstanceState | ) |