I can call AddDirections OK as long as I don't try to pass an array of waypoints (WayPointsArray : TTMSFNCMapsCoordinateRecArray;).
TMSFNCGoogleMaps1.AddDirections(
cFromAddress,
cToAddress,
True, // ShowMarkers
True, // Show Polyline
Color, // aStrokeColor
2, // aStrokeWidth
1, // aStrokeOpacity
TTMSFNCGoogleMapsDirectionsTravelMode(0), // travel mode
False, // avoid tolls
WayPointsArray, // WayPoints
True // Optimize
);
When I do, I am told "There is no overloaded version of 'AddDirections' that can be called with these arguments. Thinking it because I was using an address for the Start and Destination locations, I changed it to:
TMSFNCGoogleMaps1.AddDirections(
aOriginLatitude,
aOriginLongitude,
aDestinationLatitude,
aDestinationLongitude,
True, // ShowMarkers
True, // Show Polyline
Color, // aStrokeColor
2, // aStrokeWidth
1, // aStrokeOpacity
TTMSFNCGoogleMapsDirectionsTravelMode(0), // travel mode
False, // avoid tolls
WayPointsArray,
True );
Now I'm getting a 'Too many parameters' error. What's the secret to passing parameters to the AddAddress function? I can use TMSFNCDirections1.GetDirections successfully.