ThinkGeo.com    |     Documentation    |     Premium Support

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

  I want to zoom in or zoom out to a certain scale when I'm using Mouse Wheel.

for example, I want my map to zoom in or zoom out in the following scales when I'm using Mouse Wheel.

{1000000, 500000, 250000, 100000, 50000, 25000, 10000, 5000, 2500 }


 How can I do that? I'm excepting your reply !

thank you very much!


 



Senlin,


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


Any more questions just feel free to let me know.


Thanks.


Yale

 



1297-Post6426Sample.zip (21.3 KB)

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


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


Senlin,


I agree with you that if the scales are not set correctly, it will affect the performance because of lacking in tiles. So I suggest you use the preset scales shown in my application.
 
In 3.x version, we use the following way to forbid mouse wheel:

winformsMap1.ExtentOverlay.MouseWheelMode = MapMouseWheelMode.Disabled;

 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale