Description


Retrieves the elevation data for a Path that contains latitude and longitude coordinates. The start location (first coordinate in Path) and end location (last coordinate in path) are used to form a straight line. The elevation data is retrieved along the straight path at specified intervals. The number of intervals is indicated by the ResultCount parameter. The data is added to the Elevations collection. Returns true if the request succeeded, false otherwise. Maps Elevation API activation is required.





Example


procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
    i, c: integer;
begin
    if Form1.Map1.GetElevation2(Form1.Map1.Polylines[0].Polyline.Path) then
    begin
        c := Form1.Map1.Elevations.Count-1;
        for i := 0 to c do
        begin
            ShowMessage(FloatToStr(Form1.Map1.Elevations[i].Elevation));
        end;
    end else ShowMessage('Error');
end;