Home > Web Site Updates > COSMCtrl v1.0

COSMCtrl v1.0

November 28, 2009

I haven’t released a lot of new code to my web site in a while so its always good to write some green fields code and release it to my web site. I’ve become involved in the OpenStreeMap project of late and have collected most of the data for County Wexford in the south east of Ireland. I thought that I could also write some code which uses it as I have always had an interest in GIS and maps in general. COSMCtrl is a freeware MFC GUI control class which supports display of OpenStreeMap tiles just like how their web site displays the maps. A brief synopsis of the features which the code provides are:

  • Provides a standard MFC CStatic derived class which can be used just like the CStatic class.
  • Supports Mapnik, Osmarender and Cyclemap tile providers
  • Supports downloading via Wininet to a configurable local file system cache to improve performance.
  • Supports zooming via keyboard keys and the wheel mouse (The keyboard keys ‘+’ and ‘-‘).
  • Supports scrolling via the keyboard as well as mouse dragging (The keyboard keys Left, Back, Right, End, Up, Prior and Down and Next).
  • Implements asynchronous download of visible tiles.
  • Supports a scroll rose and zoom bar based on the same controls on the OpenStreeMap web site.
  • Supports displaying a simple legend which indicates scale.
  • Provides helper methods to allow download of specific tiles.
  • A complete sample app which exercises all the classes functionality including print preview and printing support.
  • Provides a comprehensive API via the public methods of the class. In addition numerous virtual functions are provided to further customize the behaviour of the class.

Hopefully I might find the code useful in some ideas I have for upcoming projects. Happy coding!

Categories: Web Site Updates
%d bloggers like this: