Location.Convert Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Convert(String) |
Converts a String in one of the formats described by |
Convert(Double, Format) |
Converts a latitude/longitude coordinate to a String representation. |
Convert(String)
Converts a String in one of the formats described by #FORMAT_DEGREES
,
#FORMAT_MINUTES
, or #FORMAT_SECONDS
into a double.
[Android.Runtime.Register("convert", "(Ljava/lang/String;)D", "")]
public static double Convert (string coordinate);
[<Android.Runtime.Register("convert", "(Ljava/lang/String;)D", "")>]
static member Convert : string -> double
Parameters
- coordinate
- String
Returns
- Attributes
Exceptions
if coordinate is null
if the coordinate is not in one of the valid formats.
Remarks
Converts a String in one of the formats described by #FORMAT_DEGREES
, #FORMAT_MINUTES
, or #FORMAT_SECONDS
into a double. This conversion is performed in a locale agnostic method, and so is not guaranteed to round-trip with #convert(double, int)
.
Java documentation for android.location.Location.convert(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Convert(Double, Format)
Converts a latitude/longitude coordinate to a String representation.
[Android.Runtime.Register("convert", "(DI)Ljava/lang/String;", "")]
public static string Convert (double coordinate, Android.Locations.Format outputType);
[<Android.Runtime.Register("convert", "(DI)Ljava/lang/String;", "")>]
static member Convert : double * Android.Locations.Format -> string
Parameters
- coordinate
- Double
- outputType
- Format
Returns
- Attributes
Exceptions
if coordinate is less than -180.0, greater than 180.0, or is not a number.
if outputType is not one of FORMAT_DEGREES, FORMAT_MINUTES, or FORMAT_SECONDS.
Remarks
Converts a latitude/longitude coordinate to a String representation. The outputType must be one of #FORMAT_DEGREES
, #FORMAT_MINUTES
, or #FORMAT_SECONDS
. The coordinate must be a number between -180.0 and 180.0, inclusive. This conversion is performed in a method that is dependent on the default locale, and so is not guaranteed to round-trip with #convert(String)
.
Java documentation for android.location.Location.convert(double, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.