sdk-maps / com.tomtom.online.sdk.map / RouteBuilder

RouteBuilder

open class RouteBuilder

Builder class used to construct a route object that can be added to the map.

Constructors

<init>

RouteBuilder(coordinates: MutableList<LatLng!>)

Default constructor to create a route. List of coordinates that represents a route on the map that is required to start.

Functions

build

open fun build(): RouteImpl

Used to construct route object.

endIcon

open fun endIcon(endIcon: Icon!): RouteBuilder

Icon added to the end point of the route. No icon will be shown when it is not provided.

getCoordinates

open fun getCoordinates(): MutableList<LatLng!>!

Returns the list of coordinates that represents the route on the map.

getEndIcon

open fun getEndIcon(): Icon!

Returns the icon added to the end point of the route.

getId

open fun getId(): Long!

Returns the ID of a route.

getRouteStyle

open fun getRouteStyle(): RouteStyle!

Returns the route style.

getStartIcon

open fun getStartIcon(): Icon!

Returns the icon added to the start point of the route.

getTag

open fun getTag(): Serializable!

Returns the TAG.

startIcon

open fun startIcon(startIcon: Icon!): RouteBuilder

Icon added to the start point of the route. No icon will be shown when it is not provided.

style

open fun style(routeStyle: RouteStyle!): RouteBuilder

Determines the style of the route on the map which includes options like: fillColor, outlineColor, width

tag

open fun tag(tag: Serializable!): RouteBuilder

TAG is known android pattern to keep additional information. If you want to keep some data associated with the route, this field can be used in such case.