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

Focus map center on zoom

6 Answers 165 Views
Map
This is a migrated thread and some comments may be shown as answers.
figueiredorj
Top achievements
Rank 1
figueiredorj asked on 27 May 2011, 02:28 PM
Hi all.

I have a very begging question that somehow I am not able to solve/understand.
When we zoom (in or out) on map (provider bing) although we have set a center location, this location is changed on zoom.

An example:
I have set a MapPinPoint on map; now no matter zoom I do, the center of map is always this pin.

Does anyone knows how to achieve this?

Thanks in advance



6 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 01 Jun 2011, 07:09 AM
Hi figueiredorj,

It is the default behavior for the map control. When you change a zoom level using the mouse wheel, then the zooming is performed according to the current position of the mouse pointer (zoom to point).

You can disable this functionality to keep the center of map on your MapPinPoint. Also you can specify the MouseClickMode, MouseDoubleClickMode, MouseDragMode and NavigationVisibility properties to avoid changing the center of map.

<telerik:RadMap x:Name="radMap"
                Center="40,-100"
                IsMouseWheelZoomEnabled="False"
                MouseClickMode="None"
                MouseDoubleClickMode="None"
                MouseDragMode="None"
                NavigationVisibility="Collapsed"
                ZoomLevel="3">
</telerik:RadMap>

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
figueiredorj
Top achievements
Rank 1
answered on 01 Jun 2011, 09:25 AM
First of all thanks for answering me

It is not quite what I would like to do.
I understand that  on mouse wheel action it zooms in or out on the pointer pixel; what I would like to achieve is on mouse wheel to zoom in or out based on center pixel of drawing.

Can you help me on this?

Thanks again
0
Andrey
Telerik team
answered on 03 Jun 2011, 07:26 AM
Hi figueiredorj,

Unfortunately this mode is not supported in the current version of the RadMap control. We are planning to add it in the future releases. You can check its availability using our PITS:

http://www.telerik.com/support/pits.aspx#/public/silverlight/6340

All the best,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Was
Top achievements
Rank 1
answered on 03 Jun 2013, 12:09 PM
Hi Andrey, is the problem described in this subject solved? Can i disable centering without disabling mouse zooming?
0
Andrey
Telerik team
answered on 04 Jun 2013, 07:08 AM
Hello Was,

Yes, this feature is available. You can use the following settings for disabling the centering without disabling of zooming using the mouse:
<telerik:RadMap x:Name="radMap"
                Center="40,-100"
                MouseWheelMode="ZoomToCenter"
                MouseClickMode="None"
                MouseDoubleClickMode="ZoomToCenter"
                MouseDragMode="None"
                NavigationVisibility="Collapsed"
                MiniMapExpanderVisibility="Collapsed"
                ZoomLevel="3">
</telerik:RadMap>

Regards,
Andrey Murzov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Was
Top achievements
Rank 1
answered on 04 Jun 2013, 07:14 AM
Thanks a lot! This works great!
Tags
Map
Asked by
figueiredorj
Top achievements
Rank 1
Answers by
Andrey
Telerik team
figueiredorj
Top achievements
Rank 1
Was
Top achievements
Rank 1
Share this question
or