1) You can create the LocationRect instance from two locations and then calculate the distance using Width and Height properties. The LocationRect structure calculates these properties according to the DistanceUnit property of applied MapControl. The sample method is below.
GetDistance(Location location1, Location location2)
LocationRect rect =
distance = Math.Sqrt(rect.Width * rect.Width + rect.Height * rect.Height);
2) The map control contains the "Box Zoom" feature (Rectangular zoom). By default it is enabled automatically when the user holds down the SHIFT key.
- press and hold down the SHIFT key
- press left mouse button
- drag the mouse cursor
You will see the area which will be used for rectangular zoom when you release a mouse button.
Also the RadMap contains the MouseDragMode property.
The property allows using the following values:
When its value is "Select" then the "Box Zoom" feature is enabled for mouse dragging. You can use it to toggle mouse mode between dragging the map and the "Box Zoom" mode.
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!