Home > Web Site Updates > COSMCtrl v1.03

COSMCtrl v1.03

March 16, 2010

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

    • Updated the sample app to include copyright details in line with information at http://wiki.openstreetmap.org/wiki/Legal_FAQ#I_would_like_to_use_OpenStreetMap_maps._How_should_I_credit_you.3F. The copyright details are displayed in the about dialog and on the main map itself. For client applications which use COSMCtrl, you should review these details to make sure you are compliant with the OpenStreetMap licensing requirements.
    • The zoom bar can now be shown using a standard Win32 slider control instead of custom draw code and this setting is now the default. To change this behaviour you can use SetDrawZoomBarAsSlider(FALSE)
    • The setting to allow a zoom via double click has now been separated from the setting to allow a zoom via the wheel mouse.
    • Sample app now shows the modified date of the tile in the Tile Properties dialog
    • The sample app now allows a specific tile to be refreshed via the view context menu and the main application menu
    • The scroll rose, zoom bar, and scale bar can all now be placed on the control in an arbitrary position. This is achieved via two additional parameters to SetDrawScrollRose, SetDrawZoomBar and SetDrawScaleBar. These parameters allow an anchor position on the map to be chosen for the control as well as an offset position.
    • Fixed an issue where the download thread would get created if the cache directory was not specified.
    • The class now supports markers, polylines, polygons and circles being overlaid on the map. In addition to just allowing static markers, polylines, polygons and circles to be added, the code now has comprehensive support for interactively editing, dragging, moving and deleted these items. The sample app has been extensively modified to demo these features.
    • Re-implemented all GDI drawing code with GDI+. This provides much better support for features such as transparency etc and will make it easier to add more features to the code base going forward.
    • The class now supports a full set of methods to calculate the distance between two points as well as calculate the end location from a start position given a certain distance and bearing. These methods implement C++ versions of Vincenty’s Direct and Inverse algorithms. These methods are required for calculation of the scale bar as well as supporting dragging polygons and polylines. The sample app now uses these features to show the distance and bearing for the first polyline or polygon which is selected in the status bar.
    • The code to draw the scale bar has been re-factored to allow further detailed client customization.
    • The various strings which are used by the class are now all stored in a string table. You need to ensure that all the string resources of ID "IDS_OSMCTRL*" and dialog resources of "IDD_OSMCTRL*" are included in your client application.
    • Fixed a bug where the download thread would not be created if you changed the location of the map using the cursor keys
    • The control now supports a Rectangular selection mode. When this mode is activated, you can select specific markers, polylines and polygons on the map and in conjunction with support for the "Delete" button you can interactively edit the items on the map
    • Addition of a new comprehensive "Map Operations" dialog. This in conjunction with the rectangular selection mechanism allows you to delete specific tiles, download specific tiles (optionally skipping files which have already been downloaded) as well as support Mapnik re-render requests. This dialog uses a worker thread to remain responsive while these potentially lengthy operations are taking place. In addition this dialog provides feedback via a progress control and a static text notification area as the operation is taking place as well as cancelation support. This dialog on its own provides a good example on how to implement a responsive user interface while a lengthy operation is happening.
    • The control now supports "decimation" of polylines and polygons. This feature adds new nodes between all the existing nodes of a polyline or polygon. This can prove useful where you have a feature where the curvature of the earth can cause distortion of the displayed object. By default this feature is provided for by double clicking on an editable polyline or polygon. Thanks to Dermot McNally for prompting this update
    • The control now has support for drawing crosshairs at the center of the map.
    • The control now supports a ZoomToBounds method. This method takes two positions which the method will ensure will be shown on the map at the highest possible zoom level. In conjunction with various new "GetBoundingRect*" methods you can now add your various items to the map and then zoom to those items. This avoids client code needing to explicitly handle zoom levels of center positions.
    • The arrow keys now scroll by a small amount while the likes of PageUp / PageDown keys will scroll by a tile at a time.

Here’s a screen capture of the sample app in operation:

osmctrl

Advertisements
Categories: Web Site Updates
%d bloggers like this: