Struct LocationRect
Represents rectangle given in the geographical units.
Inherited Members
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public struct LocationRect
Constructors
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
System.Double
north
Latitude of the northern side of the rectangle. |
System.Double
west
Longitude of the western side of the rectangle. |
System.Double
width
Width of the rectangle given as distance unit used by RadMap control (kilometers or miles). |
System.Double
height
Height of the rectangle given as distance unit used by RadMap control (kilometers or miles). |
LocationRect(Location, Location)
Initializes a new instance of the LocationRect struct.
Declaration
public LocationRect(Location location1, Location location2)
Parameters
Location
location1
First corner of the rectangle. |
Location
location2
Second corner of the rectangle. |
Properties
Center
Gets geographical center of the rectangle.
Declaration
public Location Center { get; }
Property Value
Location
|
East
Gets the longitude of the eastern side of the rectangle.
Declaration
public double East { get; }
Property Value
System.Double
|
GeoSize
Gets geographical size of the location rectangle in degrees.
Declaration
public Size GeoSize { get; }
Property Value
System.Windows.Size
|
Height
Gets or sets height of the rectangle given as distance unit used by RadMap control (kilometers or miles).
Declaration
public double Height { get; set; }
Property Value
System.Double
|
IsEmpty
Gets value which indicates that given geographical rectangle is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean
|
MapControl
Gets or sets the MapControl. All calculated properties (like Northwest or Southeast) of this structure are calculated using setting of this map control.
Declaration
public RadMap MapControl { get; set; }
Property Value
RadMap
|
North
Gets or sets the latitude of the northern side of the rectangle.
Declaration
public double North { get; set; }
Property Value
System.Double
|
Northeast
Gets location of the northeast corner of the rectangle.
Declaration
public Location Northeast { get; }
Property Value
Location
|
Northwest
Gets location of the northwest corner of the rectangle.
Declaration
public Location Northwest { get; }
Property Value
Location
|
South
Gets the latitude of the southern side of the rectangle.
Declaration
public double South { get; }
Property Value
System.Double
|
Southeast
Gets location of the southeast corner of the rectangle.
Declaration
public Location Southeast { get; }
Property Value
Location
|
Southwest
Gets location of the southwest corner of the rectangle.
Declaration
public Location Southwest { get; }
Property Value
Location
|
UniqueId
Gets unique region ID.
Declaration
public int UniqueId { get; }
Property Value
System.Int32
|
ViewCenter
Gets view center of the rectangle.
Declaration
public Location ViewCenter { get; }
Property Value
Location
|
West
Gets or sets longitude of the western side of the rectangle.
Declaration
public double West { get; set; }
Property Value
System.Double
|
Width
Gets or sets width of the rectangle given as distance unit used by RadMap control (kilometers or miles)..
Declaration
public double Width { get; set; }
Property Value
System.Double
|
ZoomLevel
Gets zoom level optimal to show this rectangle.
Declaration
public int ZoomLevel { get; }
Property Value
System.Int32
|
Methods
Contains(Location)
Indicates whether the rectangle described by the LocationRect contains the specified location.
Declaration
public bool Contains(Location location)
Parameters
Location
location
Location to check. |
Returns
System.Boolean
true if location is inside rectangle. Otherwise false. |
Contains(LocationRect)
Detect whether location rectangle contains another one.
Declaration
public bool Contains(LocationRect other)
Parameters
LocationRect
other
Location rectangle to check. |
Returns
System.Boolean
true if this rectangle contains another one. |
Equals(Object)
Compares two LocationRect structures for equality.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The instance of LocationRect to compare to this instance. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
Overrides
Equals(LocationRect, LocationRect)
Compares two LocationRect structures for equality.
Declaration
public static bool Equals(LocationRect rect1, LocationRect rect2)
Parameters
LocationRect
rect1
The instance of LocationRect to compare. |
LocationRect
rect2
The instance of LocationRect to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
GetHashCode()
Gets a hash code for this LocationRect structure.
Declaration
public override int GetHashCode()
Returns
System.Int32
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
LocationRect
other
Location rectangle to check intersection with. |
Returns
System.Boolean
true if 2 rectangles intersect. |
IntersectWithLine(Location, Location)
Detect whether location rectangle intersect with given line.
Declaration
public bool IntersectWithLine(Location location1, Location location2)
Parameters
Location
location1
Line point 1. |
Location
location2
Line point 2. |
Returns
System.Boolean
true if line intersect rectangle. |
Parse(String)
Converts a String representation of a rectangle into the equivalent LocationRect object.
Declaration
public static LocationRect Parse(string source)
Parameters
System.String
source
The String representation of the Location object. |
Returns
LocationRect
The equivalent Location structure. |
ToString()
Creates a String representation of this LocationRect object.
Declaration
public override string ToString()
Returns
System.String
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
System.IFormatProvider
provider
The culture-specific formatting information. |
Returns
System.String
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
LocationRect
other
The rectangle to include. |
Returns
LocationRect
|
Operators
Equality(LocationRect, LocationRect)
Compares two LocationRect structures for equality.
Declaration
public static bool operator ==(LocationRect rect1, LocationRect rect2)
Parameters
LocationRect
rect1
The instance of LocationRect to compare. |
LocationRect
rect2
The instance of LocationRect to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |
Inequality(LocationRect, LocationRect)
Compares two LocationRect structures for inequality.
Declaration
public static bool operator !=(LocationRect rect1, LocationRect rect2)
Parameters
LocationRect
rect1
The instance of LocationRect to compare. |
LocationRect
rect2
The instance of LocationRect to compare. |
Returns
System.Boolean
true if instances are equal; otherwise, false. |