Hello, I'm migrating my ERP to the FNC Maps component, and I have some doubts about this migration.

The first doubt is how to remove the markers from the map that is loaded when clicking on the map, it creates a direction if you click on another point too, in the previous component there was a property in the marker that prevented the user from doing that. I still haven't found it here.
Another situation is that in my ERP we create Waypoints to demarcate stops, just like it works in the amazon delivery app, we have a similar system that when clicking on the marker it demarcates me how much time, mileage, among other situations to get to the other demarcated point in the delivery order, how would you do it here, I saw that it has wayponits but I can't define latitude and longitude in it, at least I haven't found how to do it yet.

these are the markers I mentioned, with each click on the map they create it, but I wouldn't want my ERP users to do that, I cleared the markers, but it's not interesting because it clears all of them and that bothers the use , if it had any property not to score, it would be ideal.

I managed to resolve this situation with the markers, deleting 3 different situations when clicking on the map, when there is only one marker record on the map, it is map.markers.delete(0),
If it has any record mapped with my dataset, when I click on the map I delete the last record because it starts at zero, and when I route I delete the last + 1 because it places an origin point on the map


Thanks for informing the issue was resolved!

I have only the second doubt, regarding the Waypoint, I would like to know how to manipulate them using the treelist, if you have better solutions, you can give them to me.
My situation is to mark points on already defined routes, or for example, I have a route defined by a treelist, I would like each end of a point to be the beginning of the next one and I have this information either with a waypoint or another way if any.

WayPoints can be added with the AWayPoints parameter when calling GetDirections on TTMSFNCDirections.



procedure TForm1.Button1Click(Sender: TObject);
  APIKey: string;
  StartRec, EndRec: TTMSFNCMapsCoordinateRec;
  WayPoints: TTMSFNCMapsCoordinateRecArray;
  APIKey := 'abc';
  TMSFNCMaps1.APIKey := APIKey;
  TMSFNCDirections1. APIKey := APIKey;

  StartRec.Latitude := 40.7126802;
  StartRec.Longitude := -74.0065763;
  EndRec.Latitude := 40.056344;
  EndRec.Longitude := -74.40293;

  SetLength(Waypoints, 1);
  WayPoints[0].Latitude := 40.735657;
  WayPoints[0].Longitude := -74.172363;

  TMSFNCDirections1.GetDirections(StartRec, EndRec, nil, '', nil, True, tmDriving, WayPoints);

procedure TForm1.TMSFNCDirections1GetDirections(Sender: TObject;
  const ARequest: TTMSFNCDirectionsRequest;
  const ARequestResult: TTMSFNCCloudBaseRequestResult);
  I: Integer;
  if not ARequestResult.Success then

  for I := 0 to ARequest.Items.Count - 1 do

If you are using the TTMSFNCRouteCalculator you can provide waypoints in the AWayPoints parameter of the CalculateRoute call in the same way:

TMSFNCRouteCalculator1.CalculateRoute(StartRec, EndRec, nil, WayPoints);

perfect, I managed to understand the idea I will apply it in my project, thank you very much for the answer

Happy to help!

Last doubt, referring to Polyline, in my previous component I was able to make some definitions of size and orientation for the display of polylines, here it does not work the same, I will show the source of how it is done and how it is now using TMS.

code using GMMap:

this shape was displayed on the map like this

Using TMS :


the Map looks like this in TMS.
it's probably missing some things, could you help me

To make the understanding clearer, here are delivery points, and each line marked is like the customer journeys of these sellers, so you can clearly see what you have to do, a street view image shows it a little better

the dotted dot is one of the delivery addresses

You are using the same coordinate for the start and end position of the polyline which results in a single point (circle) on the map.
You'll need to create an array for all coordinates that you want to include in your polyline instead.

I understand, I have to get the coordinates of i and j for example working with 2 for inside the getdirection