Page 1 of 1

Infinite Scroll Area Gadget w/maps demo

Posted: Tue Jun 28, 2011 8:33 pm
by kandl
I've created a canvas-like gadget, I've made a custom gadget that draws a scrolling area (for win32 only)

source code: http://burninglogic.net/static/scrollimg_demo.zip

I've also made a google maps look-alike that uses openstreetmap tiles and the scrollimg gadget
  • use mousewheel to zoom in and out
    click-drag to move pan the map
maps demo: http://burninglogic.net/static/scrollmap.zip (updated the timeout interval to 2 sec so that it'll work on slower connections)

the scrollimg gadget enables click-drag inside the gadget area i.e. panning with the mouse. the gadget uses 'painter' function that draws only the visible region of the gadget, while allowing the same smooth scrolling behavior that would normally be associated with a scrollarea gadget.

in the maps demo, painter function query the tiles associated with the viewport and asynchronously downloads the images from openstreetmap. the scroll area associated with the gadget is extremely large (signed int32). the advantage of using this gadget is that only the visible region is painted.

Re: Infinite Scroll Area Gadget w/maps demo

Posted: Mon Jul 18, 2011 10:26 pm
by Rook Zimbabwe
Very COOL!!! [on a side note: 4300 posts for me!!!] :D

Re: Infinite Scroll Area Gadget w/maps demo

Posted: Tue Jul 19, 2011 3:01 am
by rsts
Wow. What a "gadget".

Thanks for sharing.

On a side note. Some day rook or myself may have a useful post :)

cheers

Re: Infinite Scroll Area Gadget w/maps demo

Posted: Tue Jul 19, 2011 5:51 pm
by idle
Sounds good will have to look at it later and port it to linux