Skip to main content
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.

FMX.TMSFNCMapKit.hppPascalC++
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;
TTMSFNCMapKitDirectionsItem* __fastcall AddDirections(System::UnicodeString AOrigin, System::UnicodeString ADestination, bool AShowMarkers = true, bool AShowPolyline = true, TTMSFNCGraphicsColor AStrokeColor = (System::Uitypes::TAlphaColor)(0xff0000ff), int AStrokeWidth = 0x2, float AStrokeOpacity = 1.000000E+00f, TTMSFNCMapKitDirectionsTravelMode ATravelMode = (TTMSFNCMapKitDirectionsTravelMode)(0x0))/* 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.

FMX.TMSFNCMapKit.hppPascalC++
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;
TTMSFNCMapKitDirectionsItem* __fastcall AddDirections(const TTMSFNCMapsCoordinateRec &AOriginCoordinate, const TTMSFNCMapsCoordinateRec &ADestinationCoordinate, bool AShowMarkers = true, bool AShowPolyline = true, TTMSFNCGraphicsColor AStrokeColor = (System::Uitypes::TAlphaColor)(0xff0000ff), int AStrokeWidth = 0x2, float AStrokeOpacity = 1.000000E+00f, TTMSFNCMapKitDirectionsTravelMode ATravelMode = (TTMSFNCMapKitDirectionsTravelMode)(0x0))/* 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.

FMX.TMSFNCMapKit.hppPascalC++
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;
TTMSFNCMapKitDirectionsItem* __fastcall AddDirections(double AOriginLatitude, double AOriginLongitude, double ADestinationLatitude, double ADestinationLongitude, bool AShowMarkers = true, bool AShowPolyline = true, TTMSFNCGraphicsColor AStrokeColor = (System::Uitypes::TAlphaColor)(0xff0000ff), int AStrokeWidth = 0x2, float AStrokeOpacity = 1.000000E+00f, TTMSFNCMapKitDirectionsTravelMode ATravelMode = (TTMSFNCMapKitDirectionsTravelMode)(0x0))/* 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.