com.sygic.sdk.map.MapFragment Class Reference
Inheritance diagram for com.sygic.sdk.map.MapFragment:
Collaboration diagram for com.sygic.sdk.map.MapFragment:

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)
 

Detailed Description

A fragment class that automatically creates a Map.

Member Function Documentation

Camera.CameraModel com.sygic.sdk.map.MapFragment.getCameraDataModel ( )
void com.sygic.sdk.map.MapFragment.getMapAsync ( final OnMapInitListener  onMapInitListener)
Parameters
onMapInitListenerListener 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

Returns
provider to be used by MapView

Implements com.sygic.sdk.map.data.MapDataProvider.

MapView com.sygic.sdk.map.MapFragment.getMapView ( )
Returns
The map object. Can be null if is called before map was successfully initialized Returns the map object which is used with map interaction.
static MapFragment com.sygic.sdk.map.MapFragment.newInstance ( final @GlSurfaceListenerFactory.Type int  surfaceType)
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.

Parameters
surfaceTypeGl surface type for creating OpenGL surface
static MapFragment com.sygic.sdk.map.MapFragment.newInstance ( @Nullable final CameraState  initialCameraState)
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

Parameters
initialCameraStateinitial state of camera
static MapFragment com.sygic.sdk.map.MapFragment.newInstance ( @Nullable final List< String >  mapSkins)
static

Create new fragment and set initial map skins.

You can send a list of skins which will be applied to map during creation

Parameters
mapSkinsinitial skins
static MapFragment com.sygic.sdk.map.MapFragment.newInstance ( final @GlSurfaceListenerFactory.Type int  surfaceType,
@Nullable final CameraState  initialCameraState,
@Nullable final List< String >  initialSkins 
)
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

Parameters
surfaceTypeGl surface type for creating OpenGL surface
initialCameraStateinitial state of camera
static <T extends MapFragment> T com.sygic.sdk.map.MapFragment.newInstance ( final Class< T >  cls,
final @GlSurfaceListenerFactory.Type int  surfaceType,
@Nullable final CameraState  initialCameraState,
@Nullable final List< String >  initialSkins 
)
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)

The documentation for this class was generated from the following file: