| Example: |
Following is an example on how to implement user defined graphics on top of a TGeoMap named "GM". It displays two lines, the red one is at a fixed position relative to the map window, the blue one moves along with the map if the map is panned.
procedure TForm1.GMDataRendered(Sender: TObject; const Canvas: TCanvas);
begin
Canvas.Pen.Color := clRed;
Canvas.MoveTo(100,100);
Canvas.LineTo(200,200);
Canvas.Pen.Color := clBlue;
Canvas.MoveTo(100-GM.TopLeft.X,100-GM.TopLeft.Y);
Canvas.LineTo(200-GM.TopLeft.X,200-GM.TopLeft.Y);
end;
|