i am new for testing the SDK and want to now how should i do to move the layers smoothly like global mapper app instead of click by mouse within C# or C++
With the SDK you control the drawing code, so to add smooth dragging of the map you would need to render to a background bitmap, then handle dragging by bit-blitting that background bitmap by a different offset equal to the drag amount. Then when you release the mouse do a full redraw with the new bounding box as parameters to the GM_DrawLayerList function.
I used C# to do panning for BackgroundBitmap and when release the mouse i want to set new viewrect according to new offest of the image , How to translate the picxle rect to lonlat rect before i do full redraw
If you have the ground rectangle in lat/lon and the pixel rectangle you can calculate the size of each pixel on the ground. Then when you move the pixel rectangle just offset the corner locations based on how many pixels you moved the rectangle and how many degrees of longitude and latitude that offset amounts too based on your calculated degrees per pixel.
Comments
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
I used C# to do panning for BackgroundBitmap and when release the mouse i want to set new viewrect according to new offest of the image , How to translate the picxle rect to lonlat rect before i do full redraw
Thanks
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/