sdk-maps-ui-extensions / com.tomtom.online.sdk.map.ui.currentlocation / BasicCurrentLocationView

BasicCurrentLocationView

open class BasicCurrentLocationView : AppCompatImageView, CurrentLocationView, OnClickListener

Button that is used to center the map on user current location. When clicked, the map is centered on current location that is obtained from TomTom map using the TomtomMap#getCenterOfMap() method. When navigation mode is on, the behaviour is different. When the 'follow the chevron' option is turned on, the route overview is displayed. When the 'follow the chevron' option is turned off, this option is changed to on.

Constructors

<init>

BasicCurrentLocationView(context: Context!)

Constructor that uses context to initialize view, click actions and set image resource.

BasicCurrentLocationView(context: Context!, attrs: AttributeSet!)

Custom constructor that uses context to initialize view, click actions and set image resource. Also it allows to provide custom set of attributes.

BasicCurrentLocationView(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

Custom constructor that uses context to initialize view, click actions and set image resource. Also it allows to provide custom set of attributes and a reference to default style resource.

Functions

getView

open fun getView(): ImageView

hide

open fun hide(): Unit

onClick

open fun onClick(view: View!): Unit

onRestoreInstanceState

open fun onRestoreInstanceState(state: Parcelable!): Unit

onSaveInstanceState

open fun onSaveInstanceState(): Parcelable?

setLocationStatusListener

open fun setLocationStatusListener(listener: LocationStatusListener!): Unit

setMargins

open fun setMargins(left: Int, top: Int, right: Int, bottom: Int): Unit

setOnMapComponentClickCallback

open fun setOnMapComponentClickCallback(callback: MapComponentClickCallback!): Unit

show

open fun show(): Unit

updateViewWithLocationInPixels

open fun updateViewWithLocationInPixels(currentZoomLevel: Double, focalPixels: PointF!, currentLocationPixels: PointF!): Unit

updateViewWithMapLocation

open fun updateViewWithMapLocation(userLocation: Location!, focalLatitude: Double, focalLongitude: Double): Unit