MPDirectionsRenderer

+ Implementation of the DirectionsRenderer interface

Author

Martin Hansen

Constructors

Link copied to clipboard
open fun MPDirectionsRenderer(    @NonNull context: Context,     @NonNull map: GoogleMap,     @Nullable mMapControl: MapControl,     @Nullable legSelectedListener: OnLegSelectedListener)

Functions

Link copied to clipboard
open fun animate(millis: Int)
Moves and zooms the camera to a spot where the route can be seen
@MainThread
open fun animate(millis: Int, animateCamera: Boolean)
Link copied to clipboard
open fun clear()
Link copied to clipboard
open fun enableTilt(active: Boolean)
This method enables or disables tilt in the camera when viewing the route.
Link copied to clipboard
open fun getCurrentFloor(): Int
Link copied to clipboard
open fun getLegFloor(): Int
Returns the floor of the current leg
Link copied to clipboard
@MainThread
open fun initMap(clearRoute: Boolean)
This method specifies the map on which directions will be rendered.
Link copied to clipboard
open fun nextLeg(): Boolean
Selects the next leg is possible.
Link copied to clipboard
open fun onAnimationUpdate(@NonNull animation: ValueAnimator)
Link copied to clipboard
open fun previousLeg(): Boolean
Selects the previous leg is possible.
Link copied to clipboard
open fun setAccentColor(accentColor: Int)
Link copied to clipboard
open fun setAlpha(alpha: Int)
Link copied to clipboard
open fun setAnimated(isAnimated: Boolean)
Link copied to clipboard
open fun setCameraAnimated(isAnimated: Boolean)
This boolean enables the default camera animation behavior.
Link copied to clipboard
open fun setEndIcon(@Nullable endIcon: Bitmap)
Set an end icon for the directions renderer.
Link copied to clipboard
open fun setPolylineAnimated(isAnimated: Boolean)
This boolean enables animation for the route Polyline.
Link copied to clipboard
open fun setPrimaryColor(primaryColor: Int)
Link copied to clipboard
open fun setRoute(@NonNull route: Route)
Set the renderer to use the result from the DirectionsService.
Link copied to clipboard
open fun setRouteLegIndex(index: Int)
Set the (zero-based) index of the route in the DirectionsResult object to render.
open fun setRouteLegIndex(index: Int, stepIndex: Int)
Link copied to clipboard
open fun setStartIcon(@Nullable startIcon: Bitmap)
Link copied to clipboard
open fun setTextColor(textColor: Int)
Link copied to clipboard
open fun setTilt(tilt: Float)
This method changes the angle of the tilt in degrees.
Link copied to clipboard
open fun useContentOfNearbyLocations(@Nullable mpContextualInfoSettings: MPContextualInfoSettings)
If set, we will show labels and icons from nearby Locations as additional contextual information about the end positions of the rendered route segment.