Can anyone give me some code that shows how to use the AddPolyline method to the shapes collection in Delphi. The number of points is dynamic. I have tried the following (VertexList just contains the list of points where each item is Latitude,Longitude
LocationArray: array of variant;
for i := 0 to VertexList.Count - 1 do
LocationArray[i] := oMap.GetLocation(Piece(VertexList[i],',', 1), Piece(VertexList[i], ',', 2));
This does actually draw the polyline but I get an access violation in oleaut32.dll. This seems to be when the procedure ends. I can only think this is something to do with the array being freed.