Infinite Scroll Area Gadget w/maps demo

Share your advanced PureBasic knowledge/code with the community.
kandl
User
User
Posts: 11
Joined: Sat Apr 11, 2009 6:54 am

Infinite Scroll Area Gadget w/maps demo

Post 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.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Infinite Scroll Area Gadget w/maps demo

Post by Rook Zimbabwe »

Very COOL!!! [on a side note: 4300 posts for me!!!] :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Infinite Scroll Area Gadget w/maps demo

Post by rsts »

Wow. What a "gadget".

Thanks for sharing.

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

cheers
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Infinite Scroll Area Gadget w/maps demo

Post by idle »

Sounds good will have to look at it later and port it to linux
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply