Class GeoLocation
Represents a Latitude/Longitude as a 2 dimensional point that gets serialized as { lat, lon }
Assembly: OpenSearch.Client.dll
Syntax
public class GeoLocation : IEquatable<GeoLocation>, IFormattable
Constructors
|
Edit this page
View Source
GeoLocation(double, double)
Represents a Latitude/Longitude as a 2 dimensional point.
Declaration
public GeoLocation(double latitude, double longitude)
Parameters
Properties
|
Edit this page
View Source
Latitude
Declaration
[DataMember(Name = "lat")]
public double Latitude { get; }
Property Value
|
Edit this page
View Source
Longitude
Declaration
[DataMember(Name = "lon")]
public double Longitude { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(GeoLocation)
Declaration
public bool Equals(GeoLocation other)
Parameters
Returns
|
Edit this page
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
IsValidLatitude(double)
Checks if latitude
is a valid latitude between -90 and 90, inclusive.
Declaration
public static bool IsValidLatitude(double latitude)
Parameters
Type |
Name |
Description |
double |
latitude |
|
Returns
|
Edit this page
View Source
IsValidLongitude(double)
Checks if longitude
is a valid longitude between -180 and 180, inclusive.
Declaration
public static bool IsValidLongitude(double longitude)
Parameters
Type |
Name |
Description |
double |
longitude |
|
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Returns
|
Edit this page
View Source
TryCreate(double, double)
Declaration
public static GeoLocation TryCreate(double latitude, double longitude)
Parameters
Returns
Operators
|
Edit this page
View Source
implicit operator GeoLocation(double[])
Declaration
public static implicit operator GeoLocation(double[] lonLat)
Parameters
Type |
Name |
Description |
double[] |
lonLat |
|
Returns
|
Edit this page
View Source
implicit operator GeoLocation(string)
Declaration
public static implicit operator GeoLocation(string latLon)
Parameters
Type |
Name |
Description |
string |
latLon |
|
Returns
Implements
Extension Methods