Class LocationRect
Represents rectangle given in the geographical units.
Inheritance
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public sealed class LocationRect : ValueType
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. Latitude of the northern side of the rectangle. |
System. Longitude of the western side of the rectangle. |
System. Width of the rectangle given as distance unit used by RadMap control (kilometers or miles). |
System. 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
Properties
Center
Gets geographical center of the rectangle.
Declaration
public Location Center { get; }
Property Value
East
Gets the longitude of the eastern side of the rectangle.
Declaration
public double East { get; }
Property Value
System.
|
GeoSize
Gets geographical size of the location rectangle in degrees.
Declaration
public Size GeoSize { get; }
Property Value
System.
|
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.
|
IsEmpty
Gets value which indicates that given geographical rectangle is empty.
Declaration
public bool IsEmpty { get; }
Property Value
System.
|
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
North
Gets or sets the latitude of the northern side of the rectangle.
Declaration
public double North { get; set; }
Property Value
System.
|
Northeast
Gets location of the northeast corner of the rectangle.
Declaration
public Location Northeast { get; }
Property Value
Northwest
Gets location of the northwest corner of the rectangle.
Declaration
public Location Northwest { get; }
Property Value
South
Gets the latitude of the southern side of the rectangle.
Declaration
public double South { get; }
Property Value
System.
|
Southeast
Gets location of the southeast corner of the rectangle.
Declaration
public Location Southeast { get; }
Property Value
Southwest
Gets location of the southwest corner of the rectangle.
Declaration
public Location Southwest { get; }
Property Value
UniqueId
Gets unique region ID.
Declaration
public int UniqueId { get; }
Property Value
System.
|
ViewCenter
Gets view center of the rectangle.
Declaration
public Location ViewCenter { get; }
Property Value
West
Gets or sets longitude of the western side of the rectangle.
Declaration
public double West { get; set; }
Property Value
System.
|
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.
|
ZoomLevel
Gets zoom level optimal to show this rectangle.
Declaration
public int ZoomLevel { get; }
Property Value
System.
|
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. true if location is inside rectangle. Otherwise false. |
Contains(LocationRect)
Detect whether location rectangle contains another one.
Declaration
public bool Contains(LocationRect other)
Parameters
Location Location rectangle to check. |
Returns
System. true if this rectangle contains another one. |
Equals(Object)
Compares two Location
Declaration
public override bool Equals(object obj)
Parameters
System. The instance of Location |
Returns
System. true if instances are equal; otherwise, false. |
Equals(LocationRect, LocationRect)
Compares two Location
Declaration
public static bool Equals(LocationRect rect1, LocationRect rect2)
Parameters
Location The instance of Location |
Location The instance of Location |
Returns
System. true if instances are equal; otherwise, false. |
GetHashCode()
Gets a hash code for this Location
Declaration
public override int GetHashCode()
Returns
System. A hash code for this Location |
Intersect(LocationRect)
Detect whether location rectangle intersect with another one.
Declaration
public bool Intersect(LocationRect other)
Parameters
Location Location rectangle to check intersection with. |
Returns
System. 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
Returns
System. 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. The String representation of the Location object. |
Returns
Location The equivalent Location structure. |
ToString()
Creates a String representation of this Location
Declaration
public override string ToString()
Returns
System. A String containing the Latitude and Longitude values of this Location |
ToString(IFormatProvider)
Creates a String representation of this Location
Declaration
public string ToString(IFormatProvider provider)
Parameters
System. The culture-specific formatting information. |
Returns
System. A String containing the Latitude and Longitude values of this Location |
Union(LocationRect)
Expands the current rectangle exactly enough to contain the specified rectangle.
Declaration
public LocationRect Union(LocationRect other)
Parameters
Location The rectangle to include. |
Returns
Operators
Equality(LocationRect, LocationRect)
Compares two Location
Declaration
public static bool operator ==(LocationRect rect1, LocationRect rect2)
Parameters
Location The instance of Location |
Location The instance of Location |
Returns
System. true if instances are equal; otherwise, false. |
Inequality(LocationRect, LocationRect)
Compares two Location
Declaration
public static bool operator !=(LocationRect rect1, LocationRect rect2)
Parameters
Location The instance of Location |
Location The instance of Location |
Returns
System. true if instances are equal; otherwise, false. |