StructLocationRect
Represents rectangle given in the geographical units.
Definition
Namespace:Telerik.Windows.Controls.Map
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
[SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
[TypeConverter(typeof(LocationRectConverter))]
public struct LocationRect
Constructors
LocationRect(Location, Location)
Initializes a new instance of the LocationRect struct.
LocationRect(double, double, double, double)
Initializes a new instance of the LocationRect struct.
Declaration
public LocationRect(double north, double west, double width, double height)
Parameters
north
Latitude of the northern side of the rectangle.
west
Longitude of the western side of the rectangle.
width
Width of the rectangle given as distance unit used by RadMap control (kilometers or miles).
height
Height of the rectangle given as distance unit used by RadMap control (kilometers or miles).
Properties
Center
Gets geographical center of the rectangle.
East
Gets the longitude of the eastern side of the rectangle.
GeoSize
Gets geographical size of the location rectangle in degrees.
Declaration
public Size GeoSize { get; }
Property Value
Size
Height
Gets or sets height of the rectangle given as distance unit used by RadMap control (kilometers or miles).
IsEmpty
Gets value which indicates that given geographical rectangle is empty.
MapControl
Gets or sets the MapControl. All calculated properties (like Northwest or Southeast) of this structure are calculated using setting of this map control.
North
Gets or sets the latitude of the northern side of the rectangle.
Northeast
Gets location of the northeast corner of the rectangle.
Northwest
Gets location of the northwest corner of the rectangle.
South
Gets the latitude of the southern side of the rectangle.
Southeast
Gets location of the southeast corner of the rectangle.
Southwest
Gets location of the southwest corner of the rectangle.
UniqueId
Gets unique region ID.
ViewCenter
Gets view center of the rectangle.
West
Gets or sets longitude of the western side of the rectangle.
Width
Gets or sets width of the rectangle given as distance unit used by RadMap control (kilometers or miles)..
Methods
Contains(Location)
Indicates whether the rectangle described by the LocationRect contains the specified location.
Contains(LocationRect)
Detect whether location rectangle contains another one.
Declaration
public bool Contains(LocationRect other)
Parameters
other
Location rectangle to check.
Returns
true if this rectangle contains another one.
Equals(LocationRect, LocationRect)
Compares two LocationRect structures for equality.
Declaration
public static bool Equals(LocationRect rect1, LocationRect rect2)
Parameters
rect1
The instance of LocationRect to compare.
rect2
The instance of LocationRect to compare.
Returns
true if instances are equal; otherwise, false.
Equals(object)
Compares two LocationRect structures for equality.
Declaration
public override bool Equals(object obj)
Parameters
obj
The instance of LocationRect to compare to this instance.
Returns
true if instances are equal; otherwise, false.
Overrides
GetHashCode()
Gets a hash code for this LocationRect structure.
Declaration
public override int GetHashCode()
Returns
A hash code for this LocationRect structure.
Overrides
Intersect(LocationRect)
Detect whether location rectangle intersect with another one.
Declaration
public bool Intersect(LocationRect other)
Parameters
other
Location rectangle to check intersection with.
Returns
true if 2 rectangles intersect.
IntersectWithLine(Location, Location)
Detect whether location rectangle intersect with given line.
Parse(string)
Converts a String representation of a rectangle into the equivalent LocationRect object.
Declaration
public static LocationRect Parse(string source)
Parameters
source
The String representation of the Location object.
Returns
The equivalent Location structure.
ToString()
Creates a String representation of this LocationRect object.
Declaration
public override string ToString()
Returns
A String containing the Latitude and Longitude values of this LocationRect object.
Overrides
ToString(IFormatProvider)
Creates a String representation of this LocationRect 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 LocationRect object.
Union(LocationRect)
Expands the current rectangle exactly enough to contain the specified rectangle.
Declaration
public LocationRect Union(LocationRect other)
Parameters
other
The rectangle to include.
Returns
Operators
operator !=(LocationRect, LocationRect)
Compares two LocationRect structures for inequality.
Declaration
public static bool operator !=(LocationRect rect1, LocationRect rect2)
Parameters
rect1
The instance of LocationRect to compare.
rect2
The instance of LocationRect to compare.
Returns
true if instances are equal; otherwise, false.
operator ==(LocationRect, LocationRect)
Compares two LocationRect structures for equality.
Declaration
public static bool operator ==(LocationRect rect1, LocationRect rect2)
Parameters
rect1
The instance of LocationRect to compare.
rect2
The instance of LocationRect to compare.
Returns
true if instances are equal; otherwise, false.