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