Description


The function takes a screenshot of the actual map canvas. This screenshot is taken in the chosen imagetype: itJPeg, itBitmap or itPng. The graphic can easily be saved to file.



 Values

 itBitmap

 itJpeg

 itPng




Examples


// Save the map image to a file
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
   png: TPngImage;
begin
   png := TPngImage(Form1.Map1.ScreenShot(itPng));
   png.SaveToFile('d:\filename.png');
   png.Free;
end;



// transfer the map image to Image in Bitmap format
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
   bmp: TBitmap;
begin
   bmp := TBitmap(Form1.Map1.ScreenShot(itBitmap));
   Form1.Image1.Picture.Bitmap.Assign(bmp);
   bmp.Free;
end;