Struct Location
Represents latitude and longitude.
Inherited Members
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public struct Location
Constructors
Location(Double, Double)
Initializes a new instance of the Location structure.
Declaration
public Location(double latitude, double longitude)
Parameters
System.Double
latitude
Latitude. |
System.Double
longitude
Longitude. |
Properties
CalculationMethod
Gets or sets a string indicating the geocode method that was used to match the location to the map.
Declaration
public string CalculationMethod { get; set; }
Property Value
System.String
|
Description
Gets or sets the description of the location.
Declaration
public string Description { get; set; }
Property Value
System.String
|
Empty
Gets a value that represents an empty Location structure.
Declaration
public static Location Empty { get; }
Property Value
Location
|
Remarks
A Location structure with Latitude and Longitude values set to 0 is not empty. An empty Location structure has Latitude and Longitude values set to negative infinity. This is the only time a Location structure can have negative infinity values.
IsEmpty
Gets a value that indicates whether this Location structure is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
|
Remarks
A Location structure with Latitude and Longitude values set to 0 is not empty. An empty Location structure has Latitude and Longitude values set to negative infinity. This is the only time a Location structure can have negative infinity values.
Latitude
Get or sets latitude.
Declaration
public double Latitude { get; set; }
Property Value
System.Double
|
Longitude
Get or sets longitude.
Declaration
public double Longitude { get; set; }
Property Value
System.Double
|
Methods
Equals(Object)
Compares two Location structures for equality.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The instance of Location to compare to this instance. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
Overrides
Equals(Location, Location)
Compares two Location structures for equality.
Declaration
public static bool Equals(Location location1, Location location2)
Parameters
Location
location1
The instance of Location to compare. |
Location
location2
The instance of Location to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
GetCoordinates(RadMap, Point)
Gets coordinates of the point relative to the map control screen coordinates.
Declaration
public static Location GetCoordinates(RadMap mapControl, Point point)
Parameters
RadMap
mapControl
The map control instance. |
System.Windows.Point
point
Point. |
Returns
Location
Location. |
GetHashCode()
Gets a hash code for this Location structure.
Declaration
public override int GetHashCode()
Returns
System.Int32
A hash code for this Location structure. |
Overrides
GetPoint(RadMap)
Gets location of the Location structure on the given RadMap control as Point relative to the size of the control.
Declaration
public Point GetPoint(RadMap mapControl)
Parameters
RadMap
mapControl
RadMap control. |
Returns
System.Windows.Point
Point on the RadMap control. |
LogicalToPixel(RadMap, Point)
Convert a logic point to a Pixel Point on the current screen at a particular zoom level.
Declaration
public static Point LogicalToPixel(RadMap mapControl, Point logicalPoint)
Parameters
RadMap
mapControl
The map control instance. |
System.Windows.Point
logicalPoint
The logical Point. |
Returns
System.Windows.Point
Pixel Point. |
Parse(String, IFormatProvider)
Converts a String representation of a Latitude-Longitude into the equivalent Location object.
Declaration
public static Location Parse(string source, IFormatProvider provider = null)
Parameters
System.String
source
The String representation of the Location object. |
System.IFormatProvider
provider
The IFormatProvider used to format the Latitude / Longitude doubles. |
Returns
Location
The equivalent Location structure. |
PixelToLogical(RadMap, Point)
Convert a pixel point to a Logical Point on the current screen.
Declaration
public static Point PixelToLogical(RadMap mapControl, Point pixel)
Parameters
RadMap
mapControl
The map control instance. |
System.Windows.Point
pixel
Pixel Point. |
Returns
System.Windows.Point
The logical Point. |
ToKmlString(IFormatProvider)
Creates a String representation of this Location object using KML format. KML uses sequence of the Latitude and Longitude. Longitude is first and the Latitude is second.
Declaration
public string ToKmlString(IFormatProvider provider)
Parameters
System.IFormatProvider
provider
The culture-specific formatting information. |
Returns
System.String
A String containing the Latitude and Longitude values of this Location object in KML format. |
ToString()
Creates a String representation of this Location object. By default it uses CultureInfo.CurrentCulture to store the Latitude / Longitude. To use Invariant or other Culture, use the override ToString(IFormatProvider).
Declaration
public override string ToString()
Returns
System.String
A String containing the Latitude and Longitude values of this Location object. |
Overrides
ToString(IFormatProvider)
Creates a String representation of this Location object.
Declaration
public string ToString(IFormatProvider provider)
Parameters
System.IFormatProvider
provider
The culture-specific formatting information. |
Returns
System.String
A String containing the Latitude and Longitude values of this Location object. |
Operators
Equality(Location, Location)
Compares two Location structures for equality.
Declaration
public static bool operator ==(Location location1, Location location2)
Parameters
Location
location1
The instance of Location to compare. |
Location
location2
The instance of Location to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
Explicit(Location to Point)
Converts this Location structure into a Point structure.
Declaration
public static explicit operator Point(Location location)
Parameters
Location
location
The Location to convert. |
Returns
System.Windows.Point
The result of converting. |
Inequality(Location, Location)
Compares two Location structures for inequality.
Declaration
public static bool operator !=(Location location1, Location location2)
Parameters
Location
location1
The instance of Location to compare. |
Location
location2
The instance of Location to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |