googleDirectionLibrary / com.akexorcist.googledirection.util / DirectionConverter

DirectionConverter

open class DirectionConverter

Utility class for value convert in the Google Direction Library.

Since
1.0.0

Types

PathOption

open class PathOption

A bunch of parameters for convert the step to polyline options.

TransitPathOption

open class TransitPathOption

A bunch of parameters for convert the step to polyline options for transit result.

Constructors

<init>

DirectionConverter()

Utility class for value convert in the Google Direction Library.

Functions

createPolyline

open static fun createPolyline(context: Context, pathOption: PathOption): PolylineOptions

Convert the path option to the polyline options.

open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int): PolylineOptions
open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int, clickable: Boolean): PolylineOptions
open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int, clickable: Boolean, jointType: Int): PolylineOptions
open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int, clickable: Boolean, startCap: Cap, endCap: Cap): PolylineOptions
open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int, clickable: Boolean, patternItemList: MutableList<PatternItem>): PolylineOptions
open static fun createPolyline(context: Context, locationList: ArrayList<LatLng>, width: Int, color: Int, clickable: Boolean, jointType: Int, startCap: Cap, endCap: Cap, patternItemList: MutableList<PatternItem>): PolylineOptions

Convert the list of latitude and longitude to the polyline options.

createTransitPolyline

open static fun createTransitPolyline(context: Context, transitPathOption: TransitPathOption): ArrayList<PolylineOptions>

Convert the path option to the polyline options.

open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitColor: Int, walkingWidth: Int, walkingColor: Int): ArrayList<PolylineOptions>
open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitPatternItemList: MutableList<PatternItem>, transitColor: Int, walkingWidth: Int, walkingColor: Int, walkingPatternItemList: MutableList<PatternItem>): ArrayList<PolylineOptions>
open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitColor: Int, walkingWidth: Int, walkingColor: Int, clickable: Boolean): ArrayList<PolylineOptions>
open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitColor: Int, walkingWidth: Int, walkingColor: Int, clickable: Boolean, jointType: Int): ArrayList<PolylineOptions>
open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitColor: Int, walkingWidth: Int, walkingColor: Int, clickable: Boolean, startCap: Cap, endCap: Cap): ArrayList<PolylineOptions>
open static fun createTransitPolyline(context: Context, stepList: MutableList<Step>, transitWidth: Int, transitColor: Int, transitPatternItemList: MutableList<PatternItem>, walkingWidth: Int, walkingColor: Int, walkingPatternItemList: MutableList<PatternItem>, clickable: Boolean, jointType: Int, startCap: Cap, endCap: Cap): ArrayList<PolylineOptions>

Convert the list of latitude and longitude to the polyline options in transit mode.

getDirectionPoint

open static fun getDirectionPoint(stepList: MutableList<Step>): ArrayList<LatLng>

Convert the route paths to list of latitude and longitude.

getSectionPoint

open static fun getSectionPoint(stepList: MutableList<Step>): ArrayList<LatLng>

Convert the position of each step to list of latitude and longitude.