This is a migrated thread and some comments may be shown as answers.

Zooming an area of the map by dragging a retangle on the map

1 Answer 124 Views
Map
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 28 Jan 2015, 05:38 PM
Is it possible to zoom the RadMap control so it shows a rectangular area that the user has selected by drawing a rectangle over it?

That is, the user:

1. Pushes the left mouse button down, but does not lift it up, at one corner of the area which they wish to zoom.
2. Drags the mouse to the opposite corner.  A drag rectangle is drawn showing the area that will be displayed when they release the mouse button.
3. Releases the left mouse button when they have selected the area they are interested in viewing.

At that point, the map is centered on the point in the middle of the rectangle they drew and the zoom level is changed to include the area they selected.

If the control itself doesn't have this functionality, can it be implemented using custom code?

1 Answer, 1 is accepted

Sort by
0
Tony
Top achievements
Rank 1
answered on 28 Jan 2015, 10:16 PM
Never mind, I found it.  All I had to do was set the MouseDragMode property to MouseDragBehavior.Select.
Tags
Map
Asked by
Tony
Top achievements
Rank 1
Answers by
Tony
Top achievements
Rank 1
Share this question
or