CoordinateToString(CoordinateFormatOptions) Method
A string formatted and represented coordinate.
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public string ToString(
CoordinateFormatOptions options
)
- options CoordinateFormatOptions
- CoordinateFormatOptions
StringFormatted Coordinate string
The following example will demonstrate how to output a custom formatted
string representation of a Coordinate.
Coordinate c = new Coordinate(25, 25);
//Create the formatting object to pass to the ToString() overload.
CoordinateFormatOptions cfo = new CoordinateFormatOptions();
cfo.Format = CoordinateFormatType.Degree_Decimal_Minutes; //Set string format to DDM
cfo.Display_Leading_Zeros = true; //Display leading zeros
cfo.Round = 2; //Round to the 2nd decimal place
Console.WriteLine(c.ToString(cfo)); //N 25º 00' E 025º 00'