How to realize a zoom tool function with SDK?

JerryLia
JerryLia Global Mapper User
edited September 2007 in Technical Support
Hi,Mike,
I want to realize a zoom tool like which is used in GlobalMapper with SDK,and the SDK sample is too simple to find what i have to do.
Could you help me?Any help will be appreciated.:)

Comments

  • global_mapper
    global_mapper Administrator
    edited September 2007
    All that you really have to do is keep track of your current view rectangle, just like in the SDK sample application, since it is the view rectangle that you pass into the GM_DrawLayerList function to control your viewport. The one thing that the SDK sample application does not have is the ability to drag a rectangle to zoom in. To do this, simply keep track of the start location of a drag and the end location when a user finishes their draw, then use the GM_ConvertCoordPixelToGround function on those two corners to get the ground projection coordinates to use for the corners in your new view rectangle.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com