ThinkGeo.com    |     Documentation    |     Premium Support

Zoom Level and Map Extent

I am implementing pan and zoom functionality in my desktop application.  I see that there are several zoom members of the WinformMaps control, a couple of extent members, and one member called ZoomToPreviousExtent.  I just need some clarification here.



Is CurrentExtent the bounding box of the WinformMaps control in world coordinates?

Do the zoom commands change the view around the center of the WinformMaps control?

Does ZoomToPreviousExtent set the view to the last Zoom level, or does it change the Map Extent as well?



What I want to do is allow for ZoomIn and ZoomOut as well as my own 2 point zoom.  I also need a ZoomPrevious command which will change both the zoom level and the window extent.



One more question.  I saw in one of these threads that you were planning to give us control over the mouse wheel zoom and double click zoom.  Are these changes implemented?  If not do you have an estimate of when they might be included?



Charles



Charles, 
  
 CurrentExtent is the extent of the map control in world coordinates, whenever you ZoomIn or ZoomOut it will change the map’s CurrentExtent by keeping the center point, it won’t change the map’s view until winformMap.Refresh() is being called. The ZoomToPreviousExtent method can not work in version 3.0.199 and we are working on that now. 
  
 We plan to release the next Beta in next week. Please keep an eye on it. 
  
 Thanks, 
 ThinkGeo Support 


Charles, 
  
 For a bit more clarity. 
  
 1.The CurrentExtent property is what you see on the map in world coordinates. 
 2.When you use the zoom in and zoom out the center of them should not change just the scale. 
 3.The ZoomToPrevious is a special method and like Lee said it isnt working now but is fixed in the upcoming release.  What we do is every time there is any change to the current extent we track that internally.  When you call the ZoomToPrevious we set the CurrentExtent to the previous one we have in our internal list. 
 4.The ZoomIn and ZoomOut should work nicely for you as well as the ZoomToPrevious 
  
 Yes in the next release you will have full control over the zoom wheel and also the double click.  What we did was created a set of classes that inherit from InteractiveOverlay.  These overlays have methods like Click, DoubleClick, MouseWheel etc.  You can inherit from ours and override the functionality.  They are actually in a collection of InteractiveOverlays along with Track and Edit.  In this way you can have full control not only of the double click for zooming in but also for editing or track shapes. 
  
 David