ImageEn, unit hyieutils

LatLongToStr


Declaration

function LatLongToStr(const GPSDegrees, GPSMinutes, GPSSeconds: Double; const GPSReference: string): string; overload;

// Decimal overload
function LatLongToStr(const v: Double; IsLatitude: Boolean): string; overload;


Description

Outputs either a latitude or longitude value as a formatted GPS string.
For latitude values, GPSReference must be "N" or "S".
For longitude values, GPSReference must be "E" or "W".
Result is null if the value does not appear to be valid.


Example

lblLatitude.Caption  := LatLongToStr( landmark.latitude, True );
lblLongitude.Caption := LatLongToStr( landmark.longitude, False );