Home > Web Site Updates > COSMCtrl v1.15

COSMCtrl v1.15

April 30, 2011

Just to let everyone know that v1.15 of COSMCtrl has been released. Updates for this version include:

  • A major addition to the control: Implemented comprehensive support for Direct2D drawing in COSMCtrl. This support is provided by the new MFC D2D wrapper classes provided with Visual Studio 2010 SP1. By default this support is enabled so you will need to have VS 2010 and SP1 installed to take advantage. If you do not want this you can define COSMCTRL_NOD2D before pulling in the OSMCtrl classes and the code will fall back to using GDI+. This new code provides a very good sample to developers who are looking to migrate their large GDI/GDI+ code bases to D2D as the before and after code in COSMCtrl can be compared to each other. If you want to exclude D2D from COSMCtrl define COSMCTRL_NOD2D and the code will fall back to the original GDI+ drawing logic. Performance testing on my laptop indicates that the drawing code time has reduced from c. 3 – 4 ms for a full screen redraw down to c. 0.3 ms i.e. a speed up of 900%!.
  • Updated copyright details.
  • Implemented a "Delta" mode for the control. When this mode is enabled via SetDeltaMode(TRUE), any newly updated cached local tiles will be blinked with the old tile it has been replaced with, when you do a refresh/redownload of the tile
  • In debug mode the code no longer reports any ERROR_INTERNET_OPERATION_CANCELLED download errors via TRACE.
  • Fixed a bug in the download code where you would get intermittent download errors because the file is locked because of how GDI+ locks the file when you open a bitmap from it.
  • Sample app now handles the ISensorEvents::OnLeave event. This event occurs when your GPS sensor is removed from the system (such as unplugging the device if it is GPS). The app now closes down GPS mode in the control if this occurs.
  • The m_Icons member variable in COSMCtrl now maintains COSMCtrlIcon pointers rather than actual instances. This fixes a bug in the code where previously it was not clear where ownership of the resources belong to. Now since they are pointers, client code is responsible for the lifetime of the icons
  • Fixed a bug in the sample app where the CMySensorEvents::OnDataUpdated and CMySensorEvents::OnLeave could cause an access violation if called during shutdown of the sample app.
  • The GPS Location triangle is now drawn using some transparency.
  • Refactored the ancillary "COSMCtrl*" classes which the main control class depends on. All of these classes are now contained in separate modules.
  • GDI+ code path which draws fractionally zoomed tiles now uses in-memory tile cache.
  • When drawing fractionally zoomed tiles, the next zoom level tiles are now used in preference to the previous zoom level.
  • Reworked tile providers to use a new interface class of IOSMCtrlTileProvider. This allows easier addition of new tile providers.
  • Added support for Mapquest Open Aerial tiles via the new COSMCtrlMapquestAerialTileProvider class.
  • Optimized ClientToPosition and PositionToClient methods by allowing them to pass in the client rect.
  • Markers, Polylines, Polygons and circles can now be excluded from hit testing via a new "m_bHitTest" member variable
  • Fixed a memory leak in SetCacheDirectory.
  • The classes now have support for using WinHTTP instead of Wininet as the download API. Please note that if you use WinHTTP then the sample app will not provide Nominatim search and addresss lookup as currently the CNominatim class only supports Wininet and not WinHTTP.
Categories: Web Site Updates
%d bloggers like this: