You've already forked lazarus-ccr
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:
@ -10,7 +10,7 @@ object MainForm: TMainForm
|
|||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object MapView: TMapView
|
object MapView: TMapView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 640
|
Height = 640
|
||||||
@ -26,7 +26,6 @@ object MainForm: TMainForm
|
|||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
MapProvider = 'OpenStreetMap Mapnik'
|
MapProvider = 'OpenStreetMap Mapnik'
|
||||||
UseThreads = True
|
UseThreads = True
|
||||||
Zoom = 0
|
|
||||||
ZoomToCursor = False
|
ZoomToCursor = False
|
||||||
OnZoomChange = MapViewZoomChange
|
OnZoomChange = MapViewZoomChange
|
||||||
OnChange = MapViewChange
|
OnChange = MapViewChange
|
||||||
@ -77,7 +76,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Zoom:'
|
Caption = 'Zoom:'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object CbMouseCoords: TGroupBox
|
object CbMouseCoords: TGroupBox
|
||||||
AnchorSideLeft.Control = PgData
|
AnchorSideLeft.Control = PgData
|
||||||
@ -108,7 +106,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
Caption = 'Longitude'
|
Caption = 'Longitude'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object LblPositionLatitude: TLabel
|
object LblPositionLatitude: TLabel
|
||||||
AnchorSideLeft.Control = CbMouseCoords
|
AnchorSideLeft.Control = CbMouseCoords
|
||||||
@ -122,7 +119,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Latitude'
|
Caption = 'Latitude'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoPositionLongitude: TLabel
|
object InfoPositionLongitude: TLabel
|
||||||
AnchorSideLeft.Control = CbMouseCoords
|
AnchorSideLeft.Control = CbMouseCoords
|
||||||
@ -138,7 +134,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoPositionLatitude: TLabel
|
object InfoPositionLatitude: TLabel
|
||||||
AnchorSideLeft.Control = CbMouseCoords
|
AnchorSideLeft.Control = CbMouseCoords
|
||||||
@ -156,7 +151,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GbCenterCoords: TGroupBox
|
object GbCenterCoords: TGroupBox
|
||||||
@ -186,7 +180,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
Caption = 'Longitude'
|
Caption = 'Longitude'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object LblCenterLatitude: TLabel
|
object LblCenterLatitude: TLabel
|
||||||
AnchorSideLeft.Control = GbCenterCoords
|
AnchorSideLeft.Control = GbCenterCoords
|
||||||
@ -200,7 +193,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Latitude'
|
Caption = 'Latitude'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoCenterLongitude: TLabel
|
object InfoCenterLongitude: TLabel
|
||||||
AnchorSideLeft.Control = GbCenterCoords
|
AnchorSideLeft.Control = GbCenterCoords
|
||||||
@ -216,7 +208,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoCenterLatitude: TLabel
|
object InfoCenterLatitude: TLabel
|
||||||
AnchorSideLeft.Control = GbCenterCoords
|
AnchorSideLeft.Control = GbCenterCoords
|
||||||
@ -234,7 +225,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GbScreenSize: TGroupBox
|
object GbScreenSize: TGroupBox
|
||||||
@ -264,7 +254,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
Caption = 'Width'
|
Caption = 'Width'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object LblViewportHeight: TLabel
|
object LblViewportHeight: TLabel
|
||||||
AnchorSideLeft.Control = GbScreenSize
|
AnchorSideLeft.Control = GbScreenSize
|
||||||
@ -278,7 +267,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Height'
|
Caption = 'Height'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoViewportWidth: TLabel
|
object InfoViewportWidth: TLabel
|
||||||
AnchorSideTop.Control = GbScreenSize
|
AnchorSideTop.Control = GbScreenSize
|
||||||
@ -293,7 +281,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object InfoViewportHeight: TLabel
|
object InfoViewportHeight: TLabel
|
||||||
AnchorSideTop.Control = InfoViewportWidth
|
AnchorSideTop.Control = InfoViewportWidth
|
||||||
@ -310,7 +297,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Right = 16
|
BorderSpacing.Right = 16
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Label2'
|
Caption = 'Label2'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object CbDistanceUnits: TComboBox
|
object CbDistanceUnits: TComboBox
|
||||||
@ -398,7 +384,6 @@ object MainForm: TMainForm
|
|||||||
Width = 177
|
Width = 177
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Select one of the found locations:'
|
Caption = 'Select one of the found locations:'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object BtnGoTo: TButton
|
object BtnGoTo: TButton
|
||||||
AnchorSideTop.Control = CbFoundLocations
|
AnchorSideTop.Control = CbFoundLocations
|
||||||
@ -484,7 +469,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
Caption = 'Click with right mouse button to add a GPS point.'#13#10'Settings on page "Config".'
|
Caption = 'Click with right mouse button to add a GPS point.'#13#10'Settings on page "Config".'
|
||||||
ParentColor = False
|
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object GPSPointInfo: TLabel
|
object GPSPointInfo: TLabel
|
||||||
@ -504,7 +488,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'GPSPointInfo'
|
Caption = 'GPSPointInfo'
|
||||||
ParentColor = False
|
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -551,7 +534,6 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Providers:'
|
Caption = 'Providers:'
|
||||||
FocusControl = CbProviders
|
FocusControl = CbProviders
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object CbProviders: TComboBox
|
object CbProviders: TComboBox
|
||||||
AnchorSideLeft.Control = PgConfig
|
AnchorSideLeft.Control = PgConfig
|
||||||
@ -759,7 +741,6 @@ object MainForm: TMainForm
|
|||||||
Width = 39
|
Width = 39
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Backgr.'
|
Caption = 'Backgr.'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
AnchorSideLeft.Control = CbDebugTiles
|
AnchorSideLeft.Control = CbDebugTiles
|
||||||
|
@ -67,6 +67,8 @@ type
|
|||||||
function HasElevation: boolean;
|
function HasElevation: boolean;
|
||||||
function HasDateTime: Boolean;
|
function HasDateTime: Boolean;
|
||||||
function DistanceInKmFrom(OtherPt: TGPSPoint; UseElevation: boolean=true): double;
|
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 Lon: Double read GetLon;
|
||||||
property Lat: Double read GetLat;
|
property Lat: Double read GetLat;
|
||||||
@ -748,8 +750,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TGPSPoint.Create(ALon, ALat: double; AElevation: double;
|
procedure TGPSPoint.MoveTo(ALon, ALat: Double; AElevation: double = NO_ELE;
|
||||||
ADateTime: TDateTime);
|
ADateTime: TDateTime = NO_DATE);
|
||||||
begin
|
begin
|
||||||
FRealPt.Lon := ALon;
|
FRealPt.Lon := ALon;
|
||||||
FRealPt.Lat := ALat;
|
FRealPt.Lat := ALat;
|
||||||
@ -757,6 +759,13 @@ begin
|
|||||||
FDateTime := ADateTime;
|
FDateTime := ADateTime;
|
||||||
end;
|
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;
|
class function TGPSPoint.CreateFrom(aPt: TRealPoint; AElevation: Double = NO_ELE;
|
||||||
ADateTime: TDateTime = NO_DATE): TGPSPoint;
|
ADateTime: TDateTime = NO_DATE): TGPSPoint;
|
||||||
begin
|
begin
|
||||||
|
Reference in New Issue
Block a user