Move DTED layer smothly

adawiatadawiat Global Mapper UserPosts: 5
edited March 2013 in SDK
Hello ,

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++

Thanks a lot.

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited February 2013
    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.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
  • adawiatadawiat Global Mapper User Posts: 5
    edited March 2013
    Mike

    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
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2013
    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.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
Sign In or Register to comment.