Getting directions i get all markers with letters A to Z, is possibile to change with numbers?
Is also possibile customize the icon and add the waypoint name below the address or i have to manually add the markers? In this case i should send additional geocoding request so i would to avoid.
Thank you
When using the TTMSFNCGoogleMaps AddDirections call you can hide the default markers with the AShowMarkers parameter.
You would indeed need to add additional geocoding requests to retrieve the address coordinates.
However I've improved the result of the RetrievedDirectionsData event to also include these coordinates so you won't need the additional geocoding requests. This improvement will be available with the next release of TMS FNC Maps.
You can add the address name in a label below the marker by using OverlayViews.
Example code:
procedure TForm4.TMSFNCGoogleMaps1RetrievedDirectionsData(Sender: TObject;
AEventData: TTMSFNCMapsEventData;
ADirectionsData: TTMSFNCGoogleMapsDirectionsData);
var
leg: TTMSFNCGoogleMapsLegRec;
begin
if (Length(ADirectionsData.Routes) > 0) and (Length(ADirectionsData.Routes[0].Legs) > 0) then
begin
leg := ADirectionsData.Routes[0].Legs[0];
TMSFNCGoogleMaps1.BeginUpdate;
TMSFNCGoogleMaps1.AddMarker(leg.OriginCoordinate.Latitude, leg.OriginCoordinate.Longitude).AddOverlayView(leg.Origin);
TMSFNCGoogleMaps1.AddMarker(leg.DestinationCoordinate.Latitude, leg.DestinationCoordinate.Longitude).AddOverlayView(leg.Destination);
TMSFNCGoogleMaps1.EndUpdate;
end;
end;