LazMapViewer: Add GPSObj filter also to public MapViewer methods ObjsAtScreenPt and VisibleObjsAtScreenPt. Issue #39108.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9656 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
b37743bbf4
commit
223a1ca884
@ -8,14 +8,14 @@
|
||||
unit Main;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
StdCtrls, ComCtrls, Buttons, IntfGraphics, PrintersDlgs,
|
||||
Grids, ExtDlgs,
|
||||
mvGeoMath, mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine,
|
||||
mvMapViewer, mvTypes, mvGpsObj, mvGeoNames, mvDrawingEngine,
|
||||
{$IFDEF WITH_ADDONS}ConfigFrame_with_Addons{$ELSE}ConfigFrame{$ENDIF};
|
||||
|
||||
type
|
||||
@ -125,7 +125,7 @@ implementation
|
||||
uses
|
||||
LCLType, IniFiles, Math, FPCanvas, FPImage, GraphType,
|
||||
Printers, OSPrinters,
|
||||
mvEngine, mvGPX,
|
||||
mvEngine, mvGPX, mvGeoMath,
|
||||
globals, gpsPtForm, gpslistform;
|
||||
|
||||
type
|
||||
|
@ -705,8 +705,10 @@ type
|
||||
function LatLonToScreen(aPt: TRealPoint): TPoint;
|
||||
function LatLonToScreen(Lat, Lon: Double): TPoint; overload;
|
||||
function LonLatToScreen(aPt: TRealPoint): TPoint; deprecated 'Use LatLonToScreen';
|
||||
function ObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1): TGPSObjArray;
|
||||
function VisibleObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1): TGPSObjArray;
|
||||
function ObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1;
|
||||
AClass: TGPSObjClass = nil): TGPSObjArray;
|
||||
function VisibleObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1;
|
||||
AClass: TGPSObjClass = nil): TGPSObjArray;
|
||||
procedure SaveToFile(AClass: TRasterImageClass; const AFileName: String);
|
||||
function SaveToImage(AClass: TRasterImageClass): TRasterImage;
|
||||
procedure SaveToStream(AClass: TRasterImageClass; AStream: TStream);
|
||||
@ -3962,18 +3964,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMapView.ObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1): TGPSObjArray;
|
||||
function TMapView.ObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1;
|
||||
AClass: TGPSObjClass = nil): TGPSObjArray;
|
||||
begin
|
||||
if ATolerance = -1 then
|
||||
ATolerance := POINT_DELTA;
|
||||
Result := FindObjsAtScreenPt(X, Y, ATolerance, false);
|
||||
Result := FindObjsAtScreenPt(X, Y, ATolerance, false, AClass);
|
||||
end;
|
||||
|
||||
function TMapView.VisibleObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1): TGPSObjArray;
|
||||
function TMapView.VisibleObjsAtScreenPt(X, Y: Integer; ATolerance: Integer = -1;
|
||||
AClass: TGPSObjClass = nil): TGPSObjArray;
|
||||
begin
|
||||
if ATolerance = -1 then
|
||||
ATolerance := POINT_DELTA;
|
||||
Result := FindObjsAtScreenPt(X, Y, ATolerance, true);
|
||||
Result := FindObjsAtScreenPt(X, Y, ATolerance, true, AClass);
|
||||
end;
|
||||
|
||||
procedure TMapView.CenterOnArea(const aArea: TRealArea);
|
||||
|
Loading…
Reference in New Issue
Block a user