StructLocation
Represents latitude and longitude.
Definition
Namespace:Telerik.Windows.Controls.Map
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
[TypeConverter(typeof(LocationConverter))]
public struct Location
Constructors
Location(double, double)
Initializes a new instance of the Location structure.
Properties
CalculationMethod
Gets or sets a string indicating the geocode method that was used to match the location to the map.
Description
Gets or sets the description of the location.
Empty
Gets a value that represents an empty Location structure.
Declaration
public static Location Empty { get; }
Property Value
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
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.
Methods
Equals(Location, Location)
Compares two Location structures for equality.
Equals(object)
Compares two Location structures for equality.
GetCoordinates(RadMap, Point)
Gets coordinates of the point relative to the map control screen coordinates.
GetHashCode()
Gets a hash code for this Location structure.
Declaration
public override int GetHashCode()
Returns
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
mapControl
RadMap control.
Returns
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
mapControl
The map control instance.
logicalPoint
Point
The logical Point.
Returns
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
source
The String representation of the Location object.
provider
The IFormatProvider used to format the Latitude / Longitude doubles.
Returns
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
mapControl
The map control instance.
pixel
Point
Pixel Point.
Returns
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
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Kml")]
public string ToKmlString(IFormatProvider provider)
Parameters
provider
The culture-specific formatting information.
Returns
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
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
provider
The culture-specific formatting information.
Returns
A String containing the Latitude and Longitude values of this Location object.
ToString(string)
Creates a String representation of this Location object.
Declaration
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed.")]
public string ToString(string format)
Parameters
format
The string format for the Latitude and Longitute properties.
Returns
A String containing the Latitude and Longitude values of this Location object with applied string format for the current culture.
ToString(string, IFormatProvider)
Creates a String representation of this Location object.
Declaration
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed.")]
public string ToString(string format, IFormatProvider provider)
Parameters
format
The string format for the Latitude and Longitute properties.
provider
The culture-specific formatting information.
Returns
A String containing the Latitude and Longitude values of this Location object formatted with specified string format and IFormatProvider.
Operators
explicit operator Point(Location)
Converts this Location structure into a Point structure.
Declaration
public static explicit operator Point(Location location)
Parameters
location
The Location to convert.
Returns
Point
The result of converting.
operator !=(Location, Location)
Compares two Location structures for inequality.
operator ==(Location, Location)
Compares two Location structures for equality.