|
GPS ToolKit.NET
Latitude.ToDegreesMinutesSecondsString Method
Returns a string representing a latitude value in degrees/minutes/seconds format.
Syntax
[Visual Basic]
object.ToDegreesMinutesSecondsString()
[C#]
object.ToDegreesMinutesSecondsString()
[C++]
object->ToDegreesMinutesSecondsString()
[Visual Basic]
object.ToDegreesMinutesSecondsString(NorthernHemisphereLabel, SouthernHemisphereLabel)
[C#]
object.ToDegreesMinutesSecondsString(NorthernHemisphereLabel, SouthernHemisphereLabel)
[C++]
object->ToDegreesMinutesSecondsString(NorthernHemisphereLabel, SouthernHemisphereLabel)
[Visual Basic]
object.ToDegreesMinutesSecondsString(DegreeLabel, MinutesLabel, SecondsLabel, NorthernHemisphereLabel, SouthernHemisphereLabel)
[C#]
object.ToDegreesMinutesSecondsString(DegreeLabel, MinutesLabel, SecondsLabel, NorthernHemisphereLabel, SouthernHemisphereLabel)
[C++]
object->ToDegreesMinutesSecondsString(DegreeLabel, MinutesLabel, SecondsLabel, NorthernHemisphereLabel, SouthernHemisphereLabel)
Parameters
object
An object expression that evaluates to a Latitude object.
NorthernHemisphereLabel
A string representing the desired northern hemisphere label. Default is N.
SouthernHemisphereLabel
A string representing the desired southern hemisphere label. Default is S.
DegreesLabel
A string representing the desired degrees label. Default is °.
MinutesLabel
A string representing the desired minutes label. Default is '.
SecondsLabel
A string representing the desired seconds label. Default is ".
Return Value
A string containing the latitude in dd° mm' ss.ssss" N/S format.
Remarks
If the latitude value is not available or invalid (that is, the IsValid property is false), this method returns the string "Latitude not available".
Errors
None
Example
[Visual Basic]
Dim Lat as Latitude
Dim LatString As String
Lat = myGPSToolKit.Position.Latitude
' Convert latitude to string
LatString = Lat.ToDegreesMinutesSecondsString()
[C#]
Latitude Lat;
string LatString;
Lat = myGPSToolKit.Position.Latitude;
// Convert latitude to string
LatString = Lat.ToDegreesMinutesSecondsString();
[C++]
Latitude *Lat;
String *LatString;
Lat = myGPSToolKit->Position->Latitude;
// Convert latitude to string
LatString = Lat->ToDegreesMinutesSecondsString();
See Also
ToDecimalDegreesString method | ToDegreesMinutesString method method
|