Table of Contents

TTMSFNCCustomMapKit.AddDirections Method

Adds a directions item from textual origin and destination values.

API unit family: TMSFNCMapKit Declaring type: TTMSFNCCustomMapKit

Overloads

Overload 1

Adds a directions item from textual origin and destination values.

function AddDirections(AOrigin, ADestination: string; AShowMarkers: Boolean = True; AShowPolyline: Boolean = True; AStrokeColor: TTMSFNCGraphicsColor = gcBlue; AStrokeWidth: Integer = 2; AStrokeOpacity: Single = 1; ATravelMode: TTMSFNCMapKitDirectionsTravelMode = dtmDriving): TTMSFNCMapKitDirectionsItem; overload;

Parameters

Name Description
AOrigin Textual origin address or place name.
ADestination Textual destination address or place name.
AShowMarkers When True, shows endpoint markers.
AShowPolyline When True, shows the route polyline.
AStrokeColor Color used for the route polyline.
AStrokeWidth Width used for the route polyline.
AStrokeOpacity Opacity used for the route polyline.
ATravelMode Travel mode used for route calculation.

Returns

The created directions item.

Overload 2

Adds a directions item from origin and destination coordinates.

function AddDirections(AOriginCoordinate, ADestinationCoordinate: TTMSFNCMapsCoordinateRec; AShowMarkers: Boolean = True; AShowPolyline: Boolean = True; AStrokeColor: TTMSFNCGraphicsColor = gcBlue; AStrokeWidth: Integer = 2; AStrokeOpacity: Single = 1; ATravelMode: TTMSFNCMapKitDirectionsTravelMode = dtmDriving): TTMSFNCMapKitDirectionsItem; overload;

Parameters

Name Description
AOriginCoordinate Origin coordinate for the route.
ADestinationCoordinate Destination coordinate for the route.
AShowMarkers When True, shows endpoint markers.
AShowPolyline When True, shows the route polyline.
AStrokeColor Color used for the route polyline.
AStrokeWidth Width used for the route polyline.
AStrokeOpacity Opacity used for the route polyline.
ATravelMode Travel mode used for route calculation.

Returns

The created directions item.

Overload 3

Adds a directions item from latitude and longitude values.

function AddDirections(AOriginLatitude, AOriginLongitude, ADestinationLatitude, ADestinationLongitude: Double; AShowMarkers: Boolean = True; AShowPolyline: Boolean = True; AStrokeColor: TTMSFNCGraphicsColor = gcBlue; AStrokeWidth: Integer = 2; AStrokeOpacity: Single = 1; ATravelMode: TTMSFNCMapKitDirectionsTravelMode = dtmDriving): TTMSFNCMapKitDirectionsItem; overload;

Parameters

Name Description
AOriginLatitude Latitude of the route origin.
AOriginLongitude Longitude of the route origin.
ADestinationLatitude Latitude of the route destination.
ADestinationLongitude Longitude of the route destination.
AShowMarkers When True, shows endpoint markers.
AShowPolyline When True, shows the route polyline.
AStrokeColor Color used for the route polyline.
AStrokeWidth Width used for the route polyline.
AStrokeOpacity Opacity used for the route polyline.
ATravelMode Travel mode used for route calculation.

Returns

The created directions item.