# Track zoom in map

**URL:** <https://community.thinkgeo.com/t/track-zoom-in-map/1847>\
**Category:** WinForms\
**Created:** [December 1, 2011, 3:29am UTC](https://community.thinkgeo.com/t/track-zoom-in-map/1847 "2011-12-01T03:29:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nguyen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/eb8c5e/32.png) [@nguyen](https://community.thinkgeo.com/u/nguyen)\
**Post date:** [December 1, 2011, 3:29am UTC](https://community.thinkgeo.com/t/track-zoom-in-map/1847/1 "2011-12-01T03:29:32Z")

</div>

Hi&nbsp;all!

I&nbsp;just&nbsp;try&nbsp;to&nbsp;track&nbsp;zoom&nbsp;in&nbsp;my&nbsp;map.&nbsp;But&nbsp;it's&nbsp;not&nbsp;excecute.&nbsp;I&nbsp;don't&nbsp;know&nbsp;how.&nbsp;Please&nbsp;help&nbsp;me!

It's&nbsp;my&nbsp;&nbsp;code:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_&nbsp;winformsMap1.InteractiveOverlays.Clear();_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExtentInteractiveOverlay&nbsp;extentInteractiveOverlay&nbsp;=&nbsp;new&nbsp;ExtentInteractiveOverlay();_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extentInteractiveOverlay.PanMode&nbsp;=&nbsp;MapPanMode.Disabled;_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extentInteractiveOverlay.RightClickDragMode&nbsp;=&nbsp;MapRightClickDragMode.ZoomOutWithKey;_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extentInteractiveOverlay.RightClickDragKey&nbsp;=&nbsp;Keys.None;_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extentInteractiveOverlay.ZoomPercentage&nbsp;=&nbsp;50;_  
  
_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winformsMap1.InteractiveOverlays.Add(extentInteractiveOverlay);_

&nbsp;

Thanks&nbsp;all!

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [December 1, 2011, 9:49am UTC](https://community.thinkgeo.com/t/track-zoom-in-map/1847/2 "2011-12-01T09:49:56Z")

</div>

Nguyen,&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;I&nbsp;just&nbsp;want&nbsp;to&nbsp;make&nbsp;sure&nbsp;about&nbsp;what&nbsp;you&nbsp;need&nbsp;exactely.&nbsp;What&nbsp;you&nbsp;want&nbsp;is&nbsp;to&nbsp;disable&nbsp;the&nbsp;panning&nbsp;on&nbsp;your&nbsp;map&nbsp;and&nbsp;allows&nbsp;the&nbsp;user&nbsp;to&nbsp;track&nbsp;zoom&nbsp;in&nbsp;simply&nbsp;by&nbsp;tracking&nbsp;rectangle&nbsp;without&nbsp;having&nbsp;to&nbsp;hold&nbsp;shift&nbsp;key,&nbsp;correct?&nbsp;To&nbsp;do&nbsp;that,&nbsp;you&nbsp;will&nbsp;need&nbsp;to&nbsp;extent&nbsp;the&nbsp;ExtentInteractiveOverlay&nbsp;to&nbsp;write&nbsp;that&nbsp;behavior.&nbsp;I&nbsp;don’t&nbsp;think&nbsp;you&nbsp;can&nbsp;do&nbsp;that&nbsp;simply&nbsp;by&nbsp;setting&nbsp;some&nbsp;properties.&nbsp;Thank&nbsp;you.
