# How can I zoom my map to a certain scale when I'm using Mouse Wheel?

**URL:** <https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757>\
**Category:** WinForms\
**Created:** [October 9, 2009, 3:12am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757 "2009-10-09T03:12:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![icqnow](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/f9ae1b/32.png) [@icqnow](https://community.thinkgeo.com/u/icqnow)\
**Post date:** [October 9, 2009, 3:12am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757/1 "2009-10-09T03:12:41Z")

</div>

&nbsp;&nbsp;I&nbsp;want&nbsp;to&nbsp;zoom&nbsp;in&nbsp;or&nbsp;zoom&nbsp;out&nbsp;to&nbsp;a&nbsp;certain&nbsp;scale&nbsp;when&nbsp;I'm&nbsp;using&nbsp;Mouse&nbsp;Wheel.  
  
for&nbsp;example,&nbsp;I&nbsp;want&nbsp;my&nbsp;map&nbsp;to&nbsp;zoom&nbsp;in&nbsp;or&nbsp;zoom&nbsp;out&nbsp;in&nbsp;the&nbsp;following&nbsp;scales&nbsp;when&nbsp;I'm&nbsp;using&nbsp;Mouse&nbsp;Wheel.  
  
{1000000,&nbsp;500000,&nbsp;250000,&nbsp;100000,&nbsp;50000,&nbsp;25000,&nbsp;10000,&nbsp;5000,&nbsp;2500&nbsp;}

&nbsp;How&nbsp;can&nbsp;I&nbsp;do&nbsp;that?&nbsp;I'm&nbsp;excepting&nbsp;your&nbsp;reply&nbsp;!  
  
thank&nbsp;you&nbsp;very&nbsp;much!

&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [October 10, 2009, 2:16am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757/2 "2009-10-10T02:16:52Z")

</div>

Senlin,

Attachment&nbsp;is&nbsp;our&nbsp;solution,&nbsp;hope&nbsp;it&nbsp;helps.&nbsp;Besides,&nbsp;I&nbsp;think&nbsp;your&nbsp;example&nbsp;scales&nbsp;are&nbsp;not&nbsp;so&nbsp;good&nbsp;designed&nbsp;---:)

Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.

Thanks.

Yale  
  
&nbsp;

[1297-Post6426Sample.zip](https://community.thinkgeo.com/uploads/default/original/2X/d/ddc17a97aa67f25302ba1c4d623cc4d9e8999ee5.zip) (21.3 KB)

---

<div class="post-metadata">

**Author:** ![icqnow](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/f9ae1b/32.png) [@icqnow](https://community.thinkgeo.com/u/icqnow)\
**Post date:** [October 10, 2009, 3:30am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757/3 "2009-10-10T03:30:58Z")

</div>

Yale,&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thinks&nbsp;very&nbsp;much&nbsp;for&nbsp;your&nbsp;reply!&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;want&nbsp;to&nbsp;use&nbsp;the&nbsp;TileCahce&nbsp;to&nbsp;speed&nbsp;the&nbsp;map&nbsp;dispaly,so&nbsp;I&nbsp;prepare&nbsp;to&nbsp;generate&nbsp;the&nbsp;tiles&nbsp;,the&nbsp;scales&nbsp;&nbsp;must&nbsp;be&nbsp;fixed,&nbsp;  
&nbsp;otherwise&nbsp;when&nbsp;I&nbsp;use&nbsp;the&nbsp;TileCahce&nbsp;,it&nbsp;cann’t&nbsp;user&nbsp;the&nbsp;tiles&nbsp;that&nbsp;had&nbsp;generated.the&nbsp;speed&nbsp;is&nbsp;still&nbsp;slow.&nbsp;  
&nbsp;&nbsp;but&nbsp;the&nbsp;scale&nbsp;is&nbsp;double&nbsp;type,&nbsp;it&nbsp;doesn’t&nbsp;fixed&nbsp;when&nbsp;I&nbsp;am&nbsp;using&nbsp;your&nbsp;method&nbsp;of&nbsp;the&nbsp;sample.&nbsp;how&nbsp;&nbsp;can&nbsp;&nbsp;I&nbsp;resolve&nbsp;this&nbsp;problem?&nbsp;  
&nbsp;&nbsp;I&nbsp;find&nbsp;that&nbsp;the&nbsp;old&nbsp;version&nbsp;2.6,&nbsp;I&nbsp;can&nbsp;disable&nbsp;the&nbsp;automatic&nbsp;MouseWheel&nbsp;support&nbsp;&nbsp;by&nbsp;the&nbsp;following&nbsp;code:&nbsp;  
&nbsp; &nbsp;MapControl.MapWheelSupport&nbsp;=&nbsp;false;&nbsp;  
&nbsp;in&nbsp;the&nbsp;new&nbsp;version&nbsp;,I&nbsp;can’t&nbsp;find&nbsp;the&nbsp;MapWheelSupport&nbsp;&nbsp;Property&nbsp;?&nbsp;&nbsp;  
&nbsp;I’m&nbsp;excepting&nbsp;your&nbsp;reply&nbsp;!&nbsp;  
&nbsp;thank&nbsp;you&nbsp;very&nbsp;much!&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![icqnow](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/i/f9ae1b/32.png) [@icqnow](https://community.thinkgeo.com/u/icqnow)\
**Post date:** [October 10, 2009, 3:31am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757/4 "2009-10-10T03:31:05Z")

</div>

Yale,&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thinks&nbsp;very&nbsp;much&nbsp;for&nbsp;your&nbsp;reply!&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;want&nbsp;to&nbsp;use&nbsp;the&nbsp;TileCahce&nbsp;to&nbsp;speed&nbsp;the&nbsp;map&nbsp;dispaly,so&nbsp;I&nbsp;prepare&nbsp;to&nbsp;generate&nbsp;the&nbsp;tiles&nbsp;,the&nbsp;scales&nbsp;&nbsp;must&nbsp;be&nbsp;fixed,&nbsp;  
&nbsp;otherwise&nbsp;when&nbsp;I&nbsp;use&nbsp;the&nbsp;TileCahce&nbsp;,it&nbsp;cann’t&nbsp;user&nbsp;the&nbsp;tiles&nbsp;that&nbsp;had&nbsp;generated.the&nbsp;speed&nbsp;is&nbsp;still&nbsp;slow.&nbsp;  
&nbsp;&nbsp;but&nbsp;the&nbsp;scale&nbsp;is&nbsp;double&nbsp;type,&nbsp;it&nbsp;doesn’t&nbsp;fixed&nbsp;when&nbsp;I&nbsp;am&nbsp;using&nbsp;your&nbsp;method&nbsp;of&nbsp;the&nbsp;sample.&nbsp;how&nbsp;&nbsp;can&nbsp;&nbsp;I&nbsp;resolve&nbsp;this&nbsp;problem?&nbsp;  
&nbsp;&nbsp;I&nbsp;find&nbsp;that&nbsp;the&nbsp;old&nbsp;version&nbsp;2.6,&nbsp;I&nbsp;can&nbsp;disable&nbsp;the&nbsp;automatic&nbsp;MouseWheel&nbsp;support&nbsp;&nbsp;by&nbsp;the&nbsp;following&nbsp;code:&nbsp;  
&nbsp; &nbsp;MapControl.MapWheelSupport&nbsp;=&nbsp;false;&nbsp;  
&nbsp;in&nbsp;the&nbsp;new&nbsp;version&nbsp;,I&nbsp;can’t&nbsp;find&nbsp;the&nbsp;MapWheelSupport&nbsp;&nbsp;Property&nbsp;?&nbsp;&nbsp;  
&nbsp;I’m&nbsp;excepting&nbsp;your&nbsp;reply&nbsp;!&nbsp;  
&nbsp;thank&nbsp;you&nbsp;very&nbsp;much!&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [October 10, 2009, 3:56am UTC](https://community.thinkgeo.com/t/how-can-i-zoom-my-map-to-a-certain-scale-when-im-using-mouse-wheel/757/5 "2009-10-10T03:56:13Z")

</div>

Senlin,

I&nbsp;agree&nbsp;with&nbsp;you&nbsp;that&nbsp;if&nbsp;the&nbsp;scales&nbsp;are&nbsp;not&nbsp;set&nbsp;correctly,&nbsp;it&nbsp;will&nbsp;affect&nbsp;the&nbsp;performance&nbsp;because&nbsp;of&nbsp;lacking&nbsp;in&nbsp;tiles.&nbsp;So&nbsp;I&nbsp;suggest&nbsp;you&nbsp;use&nbsp;the&nbsp;preset&nbsp;scales&nbsp;shown&nbsp;in&nbsp;my&nbsp;application.  
&nbsp;  
In&nbsp;3.x&nbsp;version,&nbsp;we&nbsp;use&nbsp;the&nbsp;following&nbsp;way&nbsp;to&nbsp;forbid&nbsp;mouse&nbsp;wheel:  
`winformsMap1.ExtentOverlay.MouseWheelMode = MapMouseWheelMode.Disabled;`  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks.  
&nbsp;  
Yale
