Infinite Scroll Area Gadget w/maps demo
Posted: Tue Jun 28, 2011 8:33 pm
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
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.
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
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.