Method ToGeoRef
ToGeoRef(MapPoint, Int32)
Returns a formatted coordinate string in World Geographic Reference System (GEOREF) notation representing the given MapPoint's location.
Declaration
public static string ToGeoRef(MapPoint point, int precision)
Parameters
Type | Name | Description |
---|---|---|
MapPoint | point | The location to be represented in GEOREF notation. It must have a SpatialReference set. |
System.Int32 | precision | The precision with which to represent the coordinate. Value is expected to be between 0 to 9 (inclusive), and will be clamped if necessary. |
Returns
Type | Description |
---|---|
System.String | A GEOREF notation string representing the position of the given point. |
Remarks
The precision
parameter controls the number of digits used to represent the fractional part of
the coordinate's latitude and longitude, expressed in minutes. For example:
precision parameter value |
Example output | Angular precision | Approximate precision (at the equator, to 1 significant figure) |
---|---|---|---|
0 | MKML5056 |
1min | 2km |
1 | MKML5056 |
1min | 2km |
2 | MKML5056 |
1min | 2km |
3 | MKML502566 |
0.1min | 200m |
4 | MKML50285665 |
0.01min | 20m |
5 | MKML5028256652 |
0.001min | 2m |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentException |
|
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 |