Skip to content

Commit

Permalink
UPDATE: to newest lazmapviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaspeters committed Dec 27, 2024
1 parent 07a8e40 commit 68a76dd
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 57 deletions.
99 changes: 50 additions & 49 deletions src/aprsmap.lps
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<ComponentName Value="FMain"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<CursorPos X="20" Y="22"/>
<IsVisibleTab Value="True"/>
<TopLine Value="192"/>
<CursorPos X="89" Y="214"/>
<UsageCount Value="208"/>
<Loaded Value="True"/>
</Unit>
Expand Down Expand Up @@ -52,8 +54,8 @@
<Filename Value="uaprs.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="5"/>
<TopLine Value="187"/>
<CursorPos X="13" Y="156"/>
<TopLine Value="113"/>
<CursorPos X="68" Y="128"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
</Unit>
Expand All @@ -69,10 +71,9 @@
<Unit>
<Filename Value="uigate.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="6"/>
<TopLine Value="265"/>
<CursorPos X="34" Y="288"/>
<CursorPos X="19" Y="285"/>
<UsageCount Value="278"/>
<Loaded Value="True"/>
</Unit>
Expand Down Expand Up @@ -145,50 +146,6 @@
</Unit>
</Units>
<JumpHistory HistoryIndex="29">
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="150" TopLine="118"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="88" TopLine="71"/>
</Position>
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="150" TopLine="118"/>
</Position>
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="155" Column="25" TopLine="118"/>
</Position>
<Position>
<Filename Value="umain.pas"/>
<Caret Line="160" Column="19" TopLine="127"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="70" Column="32" TopLine="65"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="73" Column="14" TopLine="65"/>
</Position>
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="145" Column="25" TopLine="123"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="89" Column="12" TopLine="65"/>
</Position>
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="142" Column="6" TopLine="123"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="86" Column="16" TopLine="65"/>
</Position>
<Position>
<Filename Value="ureadpipe.pas"/>
<Caret Line="98" TopLine="65"/>
Expand Down Expand Up @@ -265,6 +222,50 @@
<Filename Value="uigate.pas"/>
<Caret Line="304" Column="44" TopLine="265"/>
</Position>
<Position>
<Filename Value="uigate.pas"/>
<Caret Line="285" Column="19" TopLine="265"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="18" Column="65" TopLine="4"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="59" Column="65" TopLine="46"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="63" Column="12" TopLine="50"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="113" Column="13" TopLine="100"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="115" Column="44" TopLine="100"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="124" Column="14" TopLine="111"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="126" Column="59" TopLine="113"/>
</Position>
<Position>
<Filename Value="uaprs.pas"/>
<Caret Line="128" Column="68" TopLine="113"/>
</Position>
<Position>
<Filename Value="umain.pas"/>
<Caret Line="218" Column="29" TopLine="204"/>
</Position>
<Position>
<Filename Value="umain.pas"/>
<Caret Line="214" Column="89" TopLine="204"/>
</Position>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
Expand Down
14 changes: 7 additions & 7 deletions src/uaprs.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ procedure ConvertNMEAToLatLong(const NMEALat, NMEALon: string; out Latitude, Lon
function GetImageIndex(const Symbol, IconPrimary: String):Byte;
function LatLonToLocator(const Latitude, Longitude: Double): string;
function FindGPSItem(Layer: TMapLayer; const Call: String):TGPSObj;
function FindGPSItem(Layer: TMapLayer; const x, y: Integer):TPointOfInterest;
function FindGPSItem(Layer: TMapLayer; const x, y: Integer):TMapPointOfInterest;
function GetAltitude(const Text: String):Integer;
function GetCourse(const Text: String):Integer;
function GetSpeed(const Text: String):Integer;
Expand Down Expand Up @@ -56,11 +56,11 @@ function LatLonToLocator(const Latitude, Longitude: Double): string;
end;


function FindGPSItem(Layer: TMapLayer; const x, y: Integer):TPointOfInterest;
function FindGPSItem(Layer: TMapLayer; const x, y: Integer):TMapPointOfInterest;
var
p: TRealPoint;
i, count: Integer;
poi: TPointOfInterest;
poi: TMapPointOfInterest;
Tolerance: Double;
begin
count := Layer.PointsOfInterest.Count;
Expand Down Expand Up @@ -110,9 +110,9 @@ function FindGPSItem(Layer: TMapLayer; const Call: String):TGPSObj;


procedure SetPoi(Layer: TMapLayer; Message: PAPRSMessage; List: TGPSObjectList);
var poi: TPointOfInterest;
var poi: TMapPointOfInterest;
begin
poi := Layer.PointsOfInterest.Add as TPointOfInterest;
poi := Layer.PointsOfInterest.Add as TMapPointOfInterest;
poi.Longitude := Message^.Longitude;
poi.Latitude := Message^.Latitude;
poi.Caption := Message^.FromCall;
Expand All @@ -121,9 +121,9 @@ procedure SetPoi(Layer: TMapLayer; Message: PAPRSMessage; List: TGPSObjectList);
end;

procedure SetPoI(Layer: TMapLayer; const Latitude, Longitude: Double; const Text: String; const visibility: Boolean; const ImageIndex: Integer; List: TGPSObjectList);
var poi: TPointOfInterest;
var poi: TMapPointOfInterest;
begin
poi := Layer.PointsOfInterest.Add as TPointOfInterest;
poi := Layer.PointsOfInterest.Add as TMapPointOfInterest;
poi.Longitude := Longitude;
poi.Latitude := Latitude;
poi.Caption := Text;
Expand Down
2 changes: 1 addition & 1 deletion src/umain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ procedure TFMain.MIFileExitClick(Sender: TObject);

procedure TFMain.MVMapMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var poi: TPointOfInterest;
var poi: TMapPointOfInterest;
i, count, curZoom: Integer;
begin
poi := FindGPSItem(PoILayer, x, y);
Expand Down

0 comments on commit 68a76dd

Please sign in to comment.