ImageEn, unit iexMetaHelpers |
|
ReadExifGPSFieldsFromFile
Declaration
function ReadExifGPSFieldsFromFile(const sFilename : string;
out GPSLatitude: Double;
out GPSLongitude: Double
) : boolean; overload;
function ReadExifGPSFieldsFromFile(const sFilename : string;
out sGPSLatitude: string;
out sGPSLongitude: string
) : boolean; overload;
Description
Retrieves GPS location data from a file. The following properties are returned:
◼EXIF_GPSLatitude
◼EXIF_GPSLongitude
Returns false if
sFilename does not contain any GPS data.
// Show location on map for selected file
if ReadExifGPSFieldsFromFile( MyFileListBox.Filename, GPSLatitude, GPSLongitude ) then
Map.NavigateTo( GPSLatitude, GPSLongitude );
// Show GPS location for selected file
if ReadExifGPSFieldsFromFile( MyFileListBox.Filename, sGPSLatitude, sGPSLongitude ) then
begin
lblGPSLatitude .Caption := sGPSLatitude;
lblGPSLongitude.Caption := sGPSLongitude;
end
else
begin
lblGPSLatitude .Caption := '';
lblGPSLongitude.Caption := '';
end;