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

◆ getCameraDataModel()

Camera.CameraModel com.sygic.sdk.map.MapFragment.getCameraDataModel ( )

◆ getMapAsync()

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

◆ getMapDataModel()

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.

◆ getMapView()

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.

◆ newInstance() [1/5]

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

◆ newInstance() [2/5]

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

◆ newInstance() [3/5]

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

◆ newInstance() [4/5]

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

◆ newInstance() [5/5]

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

◆ onCreate()

void com.sygic.sdk.map.MapFragment.onCreate ( @Nullable Bundle  savedInstanceState)

◆ onCreateView()

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.

◆ onDestroy()

void com.sygic.sdk.map.MapFragment.onDestroy ( )

◆ onDestroyView()

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.

◆ onDetach()

void com.sygic.sdk.map.MapFragment.onDetach ( )

◆ onInflate()

void com.sygic.sdk.map.MapFragment.onInflate ( final Context  context,
final AttributeSet  attrs,
final Bundle  savedInstanceState 
)

◆ onPause()

void com.sygic.sdk.map.MapFragment.onPause ( )

◆ onResume()

void com.sygic.sdk.map.MapFragment.onResume ( )

◆ onSaveInstanceState()

void com.sygic.sdk.map.MapFragment.onSaveInstanceState ( @NonNull final Bundle  outState)

◆ onStart()

void com.sygic.sdk.map.MapFragment.onStart ( )

◆ onStop()

void com.sygic.sdk.map.MapFragment.onStop ( )

◆ onViewStateRestored()

void com.sygic.sdk.map.MapFragment.onViewStateRestored ( @Nullable final Bundle  savedInstanceState)

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