procedure TPsmMainForm mapMouseMove Sender TObject Shift TShiftState I

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
procedure TPsmMainForm.mapMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
mapper: TConverter;
mx, my: Double;
begin
try
if map.NLayers.Count > 0 then begin
mapper := map.NLayers[0].LConv;
mx := - (mapper.GetXForCanvas(X) / mapper.XScale + mapper.txDispl);
my := mapper.GetYForCanvas(Y) / mapper.YScale + mapper.tyDispl;
//todo: use quadrant
statusStrip.Panels[2].Text := CoordinateToStr(my) + ' ñ. ø. ' + CoordinateToStr(mx) + ' â. ä.';
end;
except
end;
end;