newInstance

open fun newInstance(surfaceType: Int): MapFragment

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: SURFACE_VIEW for android.view.SurfaceViewTEXTURE_VIEW for android.view.TextureView Default value is TEXTURE_VIEW.

Parameters

surfaceType

Gl surface type for creating OpenGL surface


open fun newInstance(@Nullable initialCameraState: CameraState): MapFragment

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

initialCameraState

initial state of camera


Create new fragment and set initial map skins.

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

Parameters

mapSkins

initial skins


open fun newInstance(surfaceType: Int, @Nullable initialCameraState: CameraState, @Nullable initialSkins: List<String>): MapFragment

Create new fragment and set the gl surface type for creating OpenGL surface and initial camera state.

Available values for gl surface type are: SURFACE_VIEW for android.view.SurfaceViewTEXTURE_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

surfaceType

Gl surface type for creating OpenGL surface

initialCameraState

initial state of camera