You've already forked lazarus-ccr
lazmapviewer: Add display of mouse-over gps-point-infos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6795 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -66,7 +66,6 @@
|
|||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
<UseHeaptrc Value="True"/>
|
|
||||||
<UseExternalDbgSyms Value="True"/>
|
<UseExternalDbgSyms Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -17,6 +17,9 @@ object GPSListViewer: TGPSListViewer
|
|||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Columns = <
|
Columns = <
|
||||||
|
item
|
||||||
|
Caption = 'ID'
|
||||||
|
end
|
||||||
item
|
item
|
||||||
Caption = 'Name'
|
Caption = 'Name'
|
||||||
Width = 150
|
Width = 150
|
||||||
@ -29,12 +32,8 @@ object GPSListViewer: TGPSListViewer
|
|||||||
Caption = 'Longitude'
|
Caption = 'Longitude'
|
||||||
Width = 150
|
Width = 150
|
||||||
end>
|
end>
|
||||||
ReadOnly = True
|
|
||||||
RowSelect = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ViewStyle = vsReport
|
ViewStyle = vsReport
|
||||||
OnDblClick = ListViewDblClick
|
|
||||||
OnSelectItem = ListViewSelectItem
|
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -197,55 +196,5 @@ object GPSListViewer: TGPSListViewer
|
|||||||
OnClick = BtnCloseClick
|
OnClick = BtnCloseClick
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object BtnClearAll: TBitBtn
|
|
||||||
AnchorSideLeft.Control = BtnDeletePoint
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideTop.Control = Panel1
|
|
||||||
Left = 234
|
|
||||||
Height = 26
|
|
||||||
Top = 6
|
|
||||||
Width = 88
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'Clear all'
|
|
||||||
Glyph.Data = {
|
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
|
||||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
|
||||||
0000000000000000003300000033000000000000000000000000000000000000
|
|
||||||
00000000000000000033000000330000000000000000FFFFFF00FFFFFF000000
|
|
||||||
0000000000333040C4FF3040C4FF000000330000000000000000000000000000
|
|
||||||
0000000000333040C4FF3040C4FF0000003300000000FFFFFF00FFFFFF000000
|
|
||||||
00333040C4FF6C7EFCFF6C7EFCFF3040C4FF0000003300000000000000000000
|
|
||||||
00333040C4FF6C7EFCFF6C7EFCFF3040C4FF00000033FFFFFF00FFFFFF003040
|
|
||||||
C4FF7182FAFF596EF9FF596EF9FF7182FAFF3040C4FF00000033000000333040
|
|
||||||
C4FF7182FAFF596EF9FF596EF9FF7182FAFF3040C4FFFFFFFF00FFFFFF003040
|
|
||||||
C4FF7687F8FF5469F7FF5469F7FF5469F7FF7687F8FF3040C4FF3040C4FF7687
|
|
||||||
F8FF5469F7FF5469F7FF5469F7FF7687F8FF3040C4FFFFFFFF00FFFFFF000000
|
|
||||||
00003040C4FF7B8CF7FF4F65F5FF4F65F5FF4F65F5FF7B8CF7FF7B8CF7FF4F65
|
|
||||||
F5FF4F65F5FF4F65F5FF7B8CF7FF3040C4FF00000000FFFFFF00FFFFFF000000
|
|
||||||
0000000000003040C4FF8291F6FF4B61F3FF4B61F3FF4B61F3FF4B61F3FF4B61
|
|
||||||
F3FF4B61F3FF8291F6FF3040C4FF0000000000000000FFFFFF00FFFFFF000000
|
|
||||||
000000000000000000003040C4FF8896F6FF465DF0FF465DF0FF465DF0FF465D
|
|
||||||
F0FF8896F6FF3040C4FF000000000000000000000000FFFFFF00FFFFFF000000
|
|
||||||
000000000000000000333040C4FF8F9DF5FF4159EEFF4159EEFF4159EEFF4159
|
|
||||||
EEFF8F9DF5FF3040C4FF000000330000000000000000FFFFFF00FFFFFF000000
|
|
||||||
0000000000333040C4FF97A3F5FF3C55ECFF3C55ECFF3C55ECFF3C55ECFF3C55
|
|
||||||
ECFF3C55ECFF97A3F5FF3040C4FF0000003300000000FFFFFF00FFFFFF000000
|
|
||||||
00333040C4FF9EABF4FF3751EAFF3751EAFF3751EAFF9EABF4FF9EABF4FF3751
|
|
||||||
EAFF3751EAFF3751EAFF9EABF4FF3040C4FF00000033FFFFFF00FFFFFF003040
|
|
||||||
C4FFA7B3F5FF324DE7FF324DE7FF324DE7FFA7B3F5FF3040C4FF3040C4FFA7B3
|
|
||||||
F5FF324DE7FF324DE7FF324DE7FFA7B3F5FF3040C4FFFFFFFF00FFFFFF003040
|
|
||||||
C4FFB0BBF5FF2D49E5FF2D49E5FFB0BBF5FF3040C4FF00000000000000003040
|
|
||||||
C4FFB0BBF5FF2D49E5FF2D49E5FFB0BBF5FF3040C4FFFFFFFF00FFFFFF000000
|
|
||||||
00003040C4FFBAC3F6FFBAC3F6FF3040C4FF0000000000000000000000000000
|
|
||||||
00003040C4FFBAC3F6FFBAC3F6FF3040C4FF00000000FFFFFF00FFFFFF000000
|
|
||||||
0000000000003040C4FF3040C4FF000000000000000000000000000000000000
|
|
||||||
0000000000003040C4FF3040C4FF0000000000000000FFFFFF00
|
|
||||||
}
|
|
||||||
OnClick = BtnClearAllClick
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -17,26 +17,20 @@ type
|
|||||||
{ TGPSListViewer }
|
{ TGPSListViewer }
|
||||||
|
|
||||||
TGPSListViewer = class(TForm)
|
TGPSListViewer = class(TForm)
|
||||||
BtnClearAll: TBitBtn;
|
|
||||||
BtnDeletePoint: TBitBtn;
|
BtnDeletePoint: TBitBtn;
|
||||||
BtnGoToPoint: TBitBtn;
|
BtnGoToPoint: TBitBtn;
|
||||||
BtnClose: TBitBtn;
|
BtnClose: TBitBtn;
|
||||||
ListView: TListView;
|
ListView: TListView;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
procedure BtnClearAllClick(Sender: TObject);
|
|
||||||
procedure BtnCloseClick(Sender: TObject);
|
procedure BtnCloseClick(Sender: TObject);
|
||||||
procedure BtnDeletePointClick(Sender: TObject);
|
procedure BtnDeletePointClick(Sender: TObject);
|
||||||
procedure BtnGoToPointClick(Sender: TObject);
|
procedure BtnGoToPointClick(Sender: TObject);
|
||||||
procedure ListViewDblClick(Sender: TObject);
|
|
||||||
procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
|
|
||||||
Selected: Boolean);
|
|
||||||
private
|
private
|
||||||
FViewer: TMapView;
|
FViewer: TMapView;
|
||||||
FList: TGpsObjList;
|
FList: TGpsObjList;
|
||||||
procedure SetViewer(AValue: TMapView);
|
procedure SetViewer(AValue: TMapView);
|
||||||
protected
|
protected
|
||||||
procedure Populate;
|
procedure Populate;
|
||||||
procedure UpdateButtonStates;
|
|
||||||
|
|
||||||
public
|
public
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -83,15 +77,15 @@ begin
|
|||||||
for i:=0 to FList.Count-1 do begin
|
for i:=0 to FList.Count-1 do begin
|
||||||
gpsObj := FList[i];
|
gpsObj := FList[i];
|
||||||
item := ListView.Items.Add;
|
item := ListView.Items.Add;
|
||||||
item.Caption := gpsObj.Name;
|
// item.Caption := IntToStr(gpsObj.ID);
|
||||||
if gpsObj is TGpsPoint then begin
|
if gpsObj is TGpsPoint then begin
|
||||||
|
item.SubItems.Add(gpsObj.Name);
|
||||||
item.Subitems.Add(FormatFloat(GPS_FORMAT, TGpsPoint(gpsObj).Lat));
|
item.Subitems.Add(FormatFloat(GPS_FORMAT, TGpsPoint(gpsObj).Lat));
|
||||||
item.Subitems.Add(FormatFloat(GPS_FORMAT, TGpsPoint(gpsObj).Lon));
|
item.Subitems.Add(FormatFloat(GPS_FORMAT, TGpsPoint(gpsObj).Lon));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
ListView.items.EndUpdate;
|
ListView.items.EndUpdate;
|
||||||
UpdateButtonStates;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -100,12 +94,6 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGPSListViewer.BtnClearAllClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FViewer.GpsItems.Clear(_CLICKED_POINTS_);
|
|
||||||
ListView.Items.Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGPSListViewer.BtnDeletePointClick(Sender: TObject);
|
procedure TGPSListViewer.BtnDeletePointClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
gpsObj: TGpsObj;
|
gpsObj: TGpsObj;
|
||||||
@ -113,20 +101,18 @@ var
|
|||||||
rPt: TRealPoint;
|
rPt: TRealPoint;
|
||||||
item: TListItem;
|
item: TListItem;
|
||||||
begin
|
begin
|
||||||
if ListView.itemIndex > -1 then begin
|
if ListView.Selected <> nil then begin
|
||||||
ListView.Items.Delete(ListView.ItemIndex);
|
gpsObj := FList[ListView.Selected.Index];
|
||||||
// Clear all GPS items in MapViewer
|
ListView.Selected.Free;
|
||||||
FViewer.GpsItems.Clear(_CLICKED_POINTS_);
|
FViewer.GpsItems.Clear(_CLICKED_POINTS_);
|
||||||
// Recreate remaining GPS items from data in ListView
|
|
||||||
for i:=0 to ListView.Items.Count-1 do begin
|
for i:=0 to ListView.Items.Count-1 do begin
|
||||||
item := ListView.Items[i];
|
item := ListView.Items[i];
|
||||||
rPt.Lon := StrToFloat(item.SubItems[1]);
|
rPt.Lon := StrToFloat(item.SubItems[2]);
|
||||||
rPt.Lat := StrToFloat(item.SubItems[0]);
|
rPt.Lat := StrToFloat(item.SubItems[1]);
|
||||||
gpsObj := TGpsPoint.CreateFrom(rPt);
|
gpsObj := TGpsPoint.CreateFrom(rPt);
|
||||||
gpsObj.Name := item.Caption;
|
gpsObj.Name := item.SubItems[0];
|
||||||
FViewer.GPSItems.Add(gpsObj, _CLICKED_POINTS_);
|
FViewer.GPSItems.Add(gpsObj, _CLICKED_POINTS_);
|
||||||
end;
|
end;
|
||||||
UpdateButtonStates;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -135,8 +121,8 @@ var
|
|||||||
gpsPt: TGpsPoint;
|
gpsPt: TGpsPoint;
|
||||||
gpsObj: TGpsObj;
|
gpsObj: TGpsObj;
|
||||||
begin
|
begin
|
||||||
if ListView.ItemIndex > -1 then begin
|
if ListView.Selected <> nil then begin
|
||||||
gpsObj := FList[ListView.ItemIndex];
|
gpsObj := FList[ListView.Selected.Index];
|
||||||
if gpsObj is TGpsPoint then begin
|
if gpsObj is TGpsPoint then begin
|
||||||
gpsPt := TGpsPoint(gpsObj);
|
gpsPt := TGpsPoint(gpsObj);
|
||||||
if Assigned(FViewer) then FViewer.Center := gpsPt.RealPoint;
|
if Assigned(FViewer) then FViewer.Center := gpsPt.RealPoint;
|
||||||
@ -144,17 +130,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGPSListViewer.ListViewDblClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
BtnGotoPointClick(nil);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGPSListViewer.ListViewSelectItem(Sender: TObject; Item: TListItem;
|
|
||||||
Selected: Boolean);
|
|
||||||
begin
|
|
||||||
UpdateButtonStates;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TGPSListViewer.SetViewer(AValue: TMapView);
|
procedure TGPSListViewer.SetViewer(AValue: TMapView);
|
||||||
begin
|
begin
|
||||||
if FViewer = AValue then
|
if FViewer = AValue then
|
||||||
@ -163,11 +138,5 @@ begin
|
|||||||
Populate;
|
Populate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGPSListViewer.UpdateButtonStates;
|
|
||||||
begin
|
|
||||||
BtnGotoPoint.Enabled := ListView.ItemIndex > -1;
|
|
||||||
BtnDeletePoint.Enabled := ListView.ItemIndex > -1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -9,8 +9,9 @@ object MainForm: TMainForm
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
|
ShowHint = True
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
object Panel1: TPanel
|
object ControlPanel: TPanel
|
||||||
Left = 632
|
Left = 632
|
||||||
Height = 545
|
Height = 545
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -22,8 +23,8 @@ object MainForm: TMainForm
|
|||||||
object CbProviders: TComboBox
|
object CbProviders: TComboBox
|
||||||
AnchorSideLeft.Control = LblProviders
|
AnchorSideLeft.Control = LblProviders
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Panel1
|
AnchorSideTop.Control = ControlPanel
|
||||||
AnchorSideRight.Control = Panel1
|
AnchorSideRight.Control = ControlPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 69
|
Left = 69
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -39,7 +40,7 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object LblProviders: TLabel
|
object LblProviders: TLabel
|
||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = ControlPanel
|
||||||
AnchorSideTop.Control = CbProviders
|
AnchorSideTop.Control = CbProviders
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 9
|
Left = 9
|
||||||
@ -82,7 +83,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideLeft.Control = CbProviders
|
AnchorSideLeft.Control = CbProviders
|
||||||
AnchorSideTop.Control = CbDoubleBuffer
|
AnchorSideTop.Control = CbDoubleBuffer
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Panel1
|
AnchorSideRight.Control = ControlPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 69
|
Left = 69
|
||||||
Height = 40
|
Height = 40
|
||||||
@ -97,7 +98,7 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object LblZoom: TLabel
|
object LblZoom: TLabel
|
||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = ControlPanel
|
||||||
AnchorSideTop.Control = ZoomTrackBar
|
AnchorSideTop.Control = ZoomTrackBar
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 9
|
Left = 9
|
||||||
@ -365,10 +366,21 @@ object MainForm: TMainForm
|
|||||||
OnClick = Button1Click
|
OnClick = Button1Click
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
end
|
end
|
||||||
|
object GPSPointInfo: TLabel
|
||||||
|
Left = 8
|
||||||
|
Height = 80
|
||||||
|
Top = 456
|
||||||
|
Width = 222
|
||||||
|
AutoSize = False
|
||||||
|
Caption = 'GPSPointInfo'
|
||||||
|
ParentColor = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object MapView: TMapView
|
object MapView: TMapView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 545
|
Height = 545
|
||||||
|
Hint = 'Displays the map'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 632
|
Width = 632
|
||||||
Active = False
|
Active = False
|
||||||
|
@ -27,6 +27,7 @@ type
|
|||||||
InfoCenterLatitude: TLabel;
|
InfoCenterLatitude: TLabel;
|
||||||
InfoCenterLongitude: TLabel;
|
InfoCenterLongitude: TLabel;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
|
GPSPointInfo: TLabel;
|
||||||
Label8: TLabel;
|
Label8: TLabel;
|
||||||
LblCenterLatitude: TLabel;
|
LblCenterLatitude: TLabel;
|
||||||
LblPositionLongitude: TLabel;
|
LblPositionLongitude: TLabel;
|
||||||
@ -38,7 +39,7 @@ type
|
|||||||
LblZoom: TLabel;
|
LblZoom: TLabel;
|
||||||
MapView: TMapView;
|
MapView: TMapView;
|
||||||
GeoNames: TMVGeoNames;
|
GeoNames: TMVGeoNames;
|
||||||
Panel1: TPanel;
|
ControlPanel: TPanel;
|
||||||
ZoomTrackBar: TTrackBar;
|
ZoomTrackBar: TTrackBar;
|
||||||
procedure BtnGoToClick(Sender: TObject);
|
procedure BtnGoToClick(Sender: TObject);
|
||||||
procedure BtnSearchClick(Sender: TObject);
|
procedure BtnSearchClick(Sender: TObject);
|
||||||
@ -214,6 +215,7 @@ begin
|
|||||||
CbProviders.ItemIndex := CbProviders.Items.Indexof(MapView.MapProvider);
|
CbProviders.ItemIndex := CbProviders.Items.Indexof(MapView.MapProvider);
|
||||||
MapView.DoubleBuffered := true;
|
MapView.DoubleBuffered := true;
|
||||||
MapView.Zoom := 1;
|
MapView.Zoom := 1;
|
||||||
|
ControlPanel.Caption := '';
|
||||||
CbUseThreads.Checked := MapView.UseThreads;
|
CbUseThreads.Checked := MapView.UseThreads;
|
||||||
CbDoubleBuffer.Checked := MapView.DoubleBuffered;
|
CbDoubleBuffer.Checked := MapView.DoubleBuffered;
|
||||||
|
|
||||||
@ -244,24 +246,43 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.MapViewMouseMove(Sender: TObject; Shift: TShiftState;
|
procedure TMainForm.MapViewMouseMove(Sender: TObject; Shift: TShiftState;
|
||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
|
const
|
||||||
|
DELTA = 3;
|
||||||
var
|
var
|
||||||
rPt: TRealPoint;
|
rPt: TRealPoint;
|
||||||
|
rArea: TRealArea;
|
||||||
|
gpsList: TGpsObjList;
|
||||||
|
L: TStrings;
|
||||||
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
(*
|
rPt := MapView.Center;
|
||||||
p := MapView.GetMouseMapPixel(X, Y);
|
InfoCenterLongitude.Caption := Format('%.6f°', [rPt.Lon]);
|
||||||
LblZoom.Caption := Format('Pixel: %d:%d', [p.X, p.Y]);
|
InfoCenterLatitude.Caption := Format('%.6f°', [rPt.Lat]);
|
||||||
p := mv.GetMouseMapTile(X, Y);
|
|
||||||
Label3.Caption := Format('Tile: %d:%d', [p.X, p.Y]);
|
|
||||||
r := mv.GetMouseMapLongLat(X, Y);
|
|
||||||
*)
|
|
||||||
|
|
||||||
rPt := MapView.ScreenToLonLat(Point(X, Y));
|
rPt := MapView.ScreenToLonLat(Point(X, Y));
|
||||||
InfoPositionLongitude.Caption := Format('%.6f°', [rPt.Lon]);
|
InfoPositionLongitude.Caption := Format('%.6f°', [rPt.Lon]);
|
||||||
InfoPositionLatitude.Caption := Format('%.6f°', [rPt.Lat]);
|
InfoPositionLatitude.Caption := Format('%.6f°', [rPt.Lat]);
|
||||||
|
|
||||||
rPt := MapView.Center;
|
rArea.TopLeft := MapView.ScreenToLonLat(Point(X-DELTA, Y-DELTA));
|
||||||
InfoCenterLongitude.Caption := Format('%.6f°', [rPt.Lon]);
|
rArea.BottomRight := MapView.ScreenToLonLat(Point(X+DELTA, Y+DELTA));
|
||||||
InfoCenterLatitude.Caption := Format('%.6f°', [rPt.Lat]);
|
gpsList := MapView.GpsItems.GetObjectsInArea(rArea);
|
||||||
|
try
|
||||||
|
if gpsList.Count > 0 then begin
|
||||||
|
L := TStringList.Create;
|
||||||
|
try
|
||||||
|
for i:=0 to gpsList.Count-1 do
|
||||||
|
if gpsList[i] is TGpsPoint then
|
||||||
|
with TGpsPoint(gpsList[i]) do
|
||||||
|
L.Add(Format('%s' + Lineending + ' (lat=%.6f°, lon=%.6f°)', [Name, Lat, Lon]));
|
||||||
|
GPSPointInfo.Caption := L.Text;
|
||||||
|
finally
|
||||||
|
L.Free;
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
GPSPointInfo.Caption := '';
|
||||||
|
finally
|
||||||
|
gpsList.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.MapViewMouseUp(Sender: TObject; Button: TMouseButton;
|
procedure TMainForm.MapViewMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Reference in New Issue
Block a user