How to realize a zoom tool function with SDK?
JerryLia
Global Mapper User
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.:)
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
-
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
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 939 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 579 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 110 Global Mapper Forum Website
