This release was made on 27th July 2021 and is based on mainline revision 9961.

The previous release, 7.2, was made on 13th May 2021 and was based on mainline revision 9870.

Setting colors of map objects individually

It is now possible to give every map object that is a line or a polygon its own main color and border color, overriding any colors set in the style sheet. Formerly that was possible only for
icons. The new feature is principally useful when inserting map objects at run time ('dynamic map objects') but can be used when building the CTM1 file by inserting appropriate logic in the .makemap rules.

The colors are set using the map object attributes _color and _border_color. They can use any color expression that is valid in a style sheet. For example: 'blue', 'orange+0.25white', '#A00', '#08123456'. Formally, a color expression consists of one or more sections separated by plus signs. The format of a section is

{ '+' { blend-ratio } } hex-color | color-name

where blend-ratio is an optional number; if it's between 0 and 1 inclusive it's treated as a fraction, otherwise as a number of 255ths; and hex-color is either #RGB, #RGBA, #RRGGBB or #RRGGBBAA. The plus sign and blend-ratio are legal only if there is a previous color to blend with.

Applying color effects to the entire style sheet: generalising night mode

Previous versions allowed a 'night mode' to be set, in which roads were made brighter and other layers were blended with a dark color to make them less prominent.

It is now possible to apply color changes to any layer or layers in the style sheet using a blend style set (TBlendStyleSet in the C++ API), which is a vector of blend styles. A blend style is a list of style names, which may include names with wild cards, and a series of colors to be blended with the main color, border color, text color, text glow color, and icon color for those styles. The blend styles are applied in order.

This generalisation of the idea of night mode allows, for example, all map objects to be drawn in a faint version of their usual colors, by blending with white, except for layers of interest, which can be drawn in brighter colors.

The colors in a blend style are treated as RGB colors. The alpha value is used as the blend ratio. The alpha value of the target color is preserved during blending, to maintain the overall visual intent of the style sheet.

New error codes to diagnose missing files and style sheet errors

There are three new error codes, KErrorMapNotFound (63), KErrorFontNotFound (64) and KErrorStyleSheetNotFound (65) to help identify the reason for a failure to create a Framework object.

In addition, style sheet errors can be located by line and column number. The error codes returned by XML parsing have been redesigned to hold the Expat parser error code, the line number, and the column number of the error. XML errors are now in the range KErrorXmlRangeStart (0x10000000) to  ErrorXmlRangeEnd (0x2AFFFFFF) inclusive. The high byte is 0x10 for errors specific to CartoType's style sheet system (e.g., nested <layer> sections), or is in the range 0x11 to 0x2A for Expat XML parser error codes. The low three bytes give the error location: one byte for the column number and the two low bytes for the line number.

The ErrorString function, which now exists on all platforms, unpacks this and other error codes into a readable string, which is supplied when an exception is thrown on the .NET, Android and iOS SDKs. In the C++ SDK the exception type remains TResult, but the user can easily call ErrorString to obtain the string version of the error.

Inserted objects are drawn in order of insertion

Map objects inserted at run-time are now drawn, if they are in the same layer and the same <condition> within the layer, in order of their map object IDs, which by default is the order in which they are inserted. Thus newer objects are consistently drawn over older objects so that user supplied graphics can be used to build up a picture.