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



LoadCalDataFromXML


Unit:SDL_geomap
Class:TGeoMap
Declaration:[1] function LoadCalDataFromXML (FName: string; DataID: string): boolean;
[2] function LoadCalDataFromXML (InStream: TMemoryStream; DataID: string): boolean;

The method LoadCalDataFromXML is available in two overloaded versions: version [1] reads the calibration data from the XML file FName which has been previously created by the methods WriteCalDataToOpenXMLFile or SaveCalDataAsXML. Version [2] reads the calibration data from the stream InStream.

If the parameter DataID is empty, the first <geomap> tag is evaluated and read into the TGeoMap instance. If DataID is not empty, the entire rest of the file is read until a <geomap> tag is found whose attribute "id " matches DataID (the recognition of the "id " attribute is not case-sensitive). The function LoadCalDataFromXML returns TRUE if both a valid starting tag <geomap> and a valid end tag </geomap> has been found and the map data has been updated.

Hint 1: For a description of the valid tags, please see WriteCalDataToOpenXMLFile.

Hint: The method LoadCalDataFromXML triggers the OnMapImageRequest immediately before it tries to load the map ímage. This provides a hook to redirect the source of the map image.

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



Last Update: 2023-Dec-13