LazMapViewer: Add method TGpsPoint.MoveTo.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8077 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-08-19 22:50:40 +00:00
parent 4fc0c636f6
commit 6312921fac
2 changed files with 12 additions and 22 deletions

View File

@@ -67,6 +67,8 @@ type
function HasElevation: boolean;
function HasDateTime: Boolean;
function DistanceInKmFrom(OtherPt: TGPSPoint; UseElevation: boolean=true): double;
procedure MoveTo(ALon, ALat: Double; AElevation: double = NO_ELE;
ADateTime: TDateTime = NO_DATE);
property Lon: Double read GetLon;
property Lat: Double read GetLat;
@@ -748,8 +750,8 @@ begin
end;
end;
constructor TGPSPoint.Create(ALon, ALat: double; AElevation: double;
ADateTime: TDateTime);
procedure TGPSPoint.MoveTo(ALon, ALat: Double; AElevation: double = NO_ELE;
ADateTime: TDateTime = NO_DATE);
begin
FRealPt.Lon := ALon;
FRealPt.Lat := ALat;
@@ -757,6 +759,13 @@ begin
FDateTime := ADateTime;
end;
constructor TGPSPoint.Create(ALon, ALat: double; AElevation: double;
ADateTime: TDateTime);
begin
MoveTo(ALon, ALat, AElevation, ADateTime);
end;
class function TGPSPoint.CreateFrom(aPt: TRealPoint; AElevation: Double = NO_ELE;
ADateTime: TDateTime = NO_DATE): TGPSPoint;
begin