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....


Class: TGeoMap
Declaration: procedure CreateAndLoadEmptyMap (FName: string; LatLow, LongLow, LatHigh, LongHigh, dLat, dLong: double; Wid, Hgt: integer; OnDrawMapData: TOnDrawMapDataEvent);

The method CreateAndLoadEmptyMap creates a blank map showing an area which is defined by the parameters LatLow, LongLow, LatHigh, LongHigh. The parameters dLat and dLong control the distance of displayed graticule lines. They may take any non-zero, positive value.

The parameters Wid and Hgt specify the width and the height of the map image (in pixels). They must not be less than 100 pixels. The blank map is written as a Windows BMP file to the disk using the file specification contained in FName.

The method CreateAndLoadEmptyMap calls the routine OnDrawMapData after the map has been created in memory and before it is saved on disk. It can be used to draw additional map features on the blank map (however, the map is not calibrated at this point, it is simply an image). It should be set to NIL if no additional drawing needs to be done.

Hint 1: Map image files can become rather large if both the Wid and the Hgt parameter are large. In order to reduce the required disk space, the bitmap is always stored as a 16-color bitmap.

Hint 2: You are responsible yourself to specify the range parameters and/or the width and height in a way that they correspond well to each other.

Example: The statement GeoMap1.CreateAndLoadEmptyMap ('c:\temp\testmap',-5,10,10,35,5,5,500,300, nil); generates the following map and stores it as file "testmap" in directory "c:\temp":

Last Update: 2014-Sep-09