Method FromLatitudeLongitude
FromLatitudeLongitude(String, SpatialReference)
Parses a coordinate string in latitude-longitude notation, and returns a Map
Declaration
public static MapPoint FromLatitudeLongitude(string coordinates, SpatialReference spatialReference)
Parameters
Type | Name | Description |
---|---|---|
System. |
coordinates | The latitude-longitude notation string for the coordinate. |
Spatial |
spatialReference | An optional Spatial |
Returns
Type | Description |
---|---|
Map |
A Map |
Remarks
The provided spatialReference
parameter must have an ellipsoid and datum matching those used
by the source of the latitude-longitude string. If no Spatial
The latitude-longitude string may contain leading and trailing whitespace, and may also contain a space, comma, or vertical bar symbol to separate the latitude from the longitude. It may also contain the characters 'N', 'S', 'E' and 'W', or use a minus (-) symbol to indicate the hemisphere of each value.
Supported Degree characters
Character | Name | Unicode number | HTML code |
---|---|---|---|
Asterisk | U+002A | * |
|
^ | Circumflex Accent | U+005E | ^ |
~ | Tilde | U+007E | ~ |
° | Degree Sign | U+00B0 | ° |
º | Masculine Ordinal Indicator | U+00BA | º |
˚ | Ring Above | U+02DA | ˚ |
⁰ | Superscript Zero | U+2070 | ⁰ |
Supported Minute characters
Character | Name | Unicode number | HTML code |
---|---|---|---|
' | Apostrophe | U+0027 | ' |
’ | Right Single Quotation Mark | U+2019 | ᾿ |
′ | Prime | U+2032 | ′ |
Supported Second characters
Character | Name | Unicode number | HTML code |
---|---|---|---|
" | Quotation Mark | U+0022 | " |
˝ | Double Acute Accent | U+02DD | ˝ |
” | Right Double Quotation Mark | U+201D | ” |
″ | Double Prime | U+2033 | ″ |
Latitude-Longitude notation examples |
---|
55 56 39.123N 003 09 43.034W |
55°56′39″N 3°09′43″W |
55~56.65205', -003~09.71723' |
55.9442008 | -3.1619539* |
Exceptions
Type | Condition |
---|---|
System. |
|
Arc |
Given coordinates could not be parsed or converted. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.1 - 200.6 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.6 |