MapView

class MapView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : BaseView

A custom View subclass that displays a map view.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Cleans the route drawing by removing all route graphics from the overlay.

Link copied to clipboard
fun display(route: Route, destinationImage: BitmapDrawable, routeColor: Int? = null)

Displays a route on the map.

Link copied to clipboard
fun displayUserPin(userLocations: List<UserLocation>)

Displays user pins on the map for the given user locations.

Link copied to clipboard
fun dispose()

Disposes the map view.

Link copied to clipboard

Checks if the user track is rendered.

Link copied to clipboard

Checks if the user track is currently visible.

Link copied to clipboard
fun removeUserTrack(completionCallback: CompletionCallback<Boolean>? = null)

Removes the user track from the map.

Link copied to clipboard
fun renderUserTrack(userId: String? = null, venueId: String? = null, startTimeMilli: Long, endTimeMilli: Long, completionCallback: CompletionCallback<Boolean>? = null)

Renders the user track on the map.

Link copied to clipboard

Rotates the map to the north.

Link copied to clipboard
fun selectFeature(feature: Feature, autoZoom: Boolean = true)

Selects a feature on the map.

Link copied to clipboard

Sets the visibility of the attribution text on the map view.

Link copied to clipboard

Sets the CustomMapTouchListener to handle map touch events.

Link copied to clipboard
fun setInitialViewpoint(isAnimated: Boolean = true)

Sets the initial viewpoint for the map.

Link copied to clipboard
fun setTapListener(tapListener: TapListener)

Sets a tap listener to handle tap events on the map.

Link copied to clipboard
fun setUserTrackVisibility(trackVisibility: Boolean)

Sets the visibility of the user track.

Link copied to clipboard

Sets a viewpoint change listener to handle changes in the map's viewpoint.

Link copied to clipboard
fun startLocationDisplay(listener: LocationDisplayErrorListener? = null, customLocationDataSource: LocationDataSource? = null)

Starts the location display on the map.

Link copied to clipboard
fun startNavigation(firstRoute: Route, destinationImage: BitmapDrawable, traversedRouteColor: Int? = null, remainingRouteColor: Int? = null): RouteTracker

Starts navigation along the specified route.

Link copied to clipboard

Stops the current navigation.

Link copied to clipboard

Unselects the currently selected feature, if any.

Link copied to clipboard
fun zoomToFeature(feature: Feature)

Zooms the map to the current GPS location.

Link copied to clipboard
fun zoomToGps()

Zooms the map to the current GPS location.

Link copied to clipboard
fun zoomToLocation(latitude: Double, longitude: Double)

Zooms the map to the specified location.

Properties

Link copied to clipboard
Link copied to clipboard
var map: Map?

The Map object associated with the map view.

Link copied to clipboard
val userMarkerMaps: MutableMap<String, PictureMarkerSymbol>