The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SuppressPaint


Unit:SDL_geomap
Class:TGeoMap
Declaration:property SuppressPaint: boolean;

Changing any aspect of a visible map will trigger its repaint process. This may cause undesirable effects and slows down the build up of complex maps. It is therefore recommended to temporarily switch off repainting when a lot of items (e.g. landmarks) have to be added or changed.

The example below shows how to deal with such situations. A bunch of 50 landmarks stored in the arrays Lat and Long is to be added to the map. Setting the property SuppressPaint to true before adding the landmarks speeds up the display of the new landmarks by 2 orders of magnitude, since the map with the freshly added landmarks is repainted only once (at the end of the routine, when SuppressPaint is set to false).

Example: How to temporarily switch off the repaint mechanism.
var
  i    : longint;

begin
GM1.SuppressPaint := true;
for i:=1 to 50 do
  GM1.AddLandMark (Lat[i], Long[i]);
GM1.SuppressPaint := false;
end;

Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): simplegeomap



Last Update: 2023-Dec-13