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

2 posts, 0 answers
  1. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 28 Jan 2015 Link to this post

    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?
  2. Tony
    Tony avatar
    111 posts
    Member since:
    May 2011

    Posted 28 Jan 2015 in reply to Tony Link to this post

    Never mind, I found it.  All I had to do was set the MouseDragMode property to MouseDragBehavior.Select.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top