skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class LocationRect

Represents rectangle given in the geographical units.

Inheritance
System.Object
LocationRect
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.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.

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.

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.

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.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.