This release on 26th April 2019 based on mainline revision 8175.

Previous release 5.6 on 11th February 2019 based on mainline revision 7972.

General

Turn instructions now work properly for contraction hierarchy routing.
The navigation states have been changed; there are different states and their meanings are different.

The Maps App

The style sheet editor is now a non-modal dialog.

Framework API

Added functions to display turn instructions during navigation, including a turn diagram.
Made the current view state serialisable so that it can be saved and reloaded by apps.

C++ API

Deprecated synonyms for enum class constants have been removed.
TPerspectiveParam now stores its terrain position in degrees for convenient serialisation.
TViewState now stores its terrain position in degrees for convenient serialisation.
Removed CFramework::Name(), which was redundant.
Added functions to enable and disable turn instruction display, and to override automatic turn instructions.
AddNavigatorObserver now takes a weak pointer, not a raw pointer.
Added setters and getters for the navigation parameters.
Removed deprecated function GetNearestRoad; use FindNearestRoad.

.NET API

The NavigationState enum class has changed in both its state constants and their meanings.
Added the PerspectiveParam class to allow setting and getting of perspective parameters.
Added the ViewState class to allow setting and getting of the view state.
Added the NavigatorParam class to allow setting and getting of the navigator parameters.
Added SetTurnInstructions, EnableTurnInstructions, SetTurnInstructionText and TurnInstructionText to control the display of turn instructions.
Added the CreateWritableMap, MapHandle, MapIsWritable, and EnableAllMaps functions to control the current maps.
Added a LoadFont overload which takes data in memory.
Added a SetPerspective overload which takes a PerspectiveParam object, and GetPerspectiveParam to return the current perspective parameters.
Added RotateAndZoom to rotate and zoom simultaneously.
Added a SetView overload with a ViewState parameter to set the view to a view state, and GetViewState to get the current view state.
Removed the deprecated GetNearestRoad function; use FindNearestRoad.
Added AddTurnLine to the Legend class to allow turn instructions to be added to a legend notice.

Android API

The NavigationState enum class has changed in both its state constants and their meanings.
Added the PerspectiveParam class to allow setting and getting of perspective parameters.
Added the ViewState class to allow setting and getting of the view state.
Added the NavigatorParam class to allow setting and getting of the navigator parameters.
Simplified the names of the RoadType constants and added useful new ones matching those in the C++ API.
Added setTurnInstructions, enableTurnInstructions, setTurnInstructionText and turnInstructionText to control the display of turn instructions.
Added resolutionDpi to get the display resolution.
Added a setPerspective which takes a PerspectiveParam object, and getPerspectiveParam to return the current perspective parameters.
Added a setView overload with a ViewState parameter to set the view to a view state, and getViewState to get the current view state.
Added setNavigatorParam and getNavigatorParam to set and get the navigator parameters.
Removed the unneeded positionKnown function.
Added onTap, onDoubleTap and onLongPress as overridable functions to MapView to allow apps to respond to tap, double tap and long press gestures more easily.

iOS API

The CartoTypeNavigationState enum struct has changed in both its state constants and their meanings.
Added the CartoTypePerspectiveParam class to allow setting and getting of perspective parameters.
Added the CartoTypeViewState class to allow setting and getting of the view state.
Added the CartoTypeNavigatorParam class to allow setting and getting of the navigator parameters.
Added setTurnInstructions, enableTurnInstructions, setTurnInstructionText and turnInstructionText to control the display of turn instructions.
Added a setPerspective overload which takes a CartoTypePerspectiveParam object, and getPerspectiveParam to return the current perspective parameters.
Added a setView overload with a CartoTypeViewState parameter to set the view to a view state, and getViewState to get the current view state.
Removed the unneeded navigationPositionKnown function.
Added setNavigatorParam and getNavigatorParam to set and get the navigator parameters.
Removed the deprecated getNearestRoad function; use findNearestRoad.
CartoTypeViewController now handles a transition to a new display size, as caused by rotating a phone from portrait to landscape, correctly.

Important changes made during the lifetime of release 5.6

fixed case 2451: slow text search when map split into contours and main data
the route table start position is now zero when it was not written because there were no routable objects; that causes it to be ignored, as desired
fixed very large road lengths in turn-expanded router caused by part of road seeming longer than the whole road when measured in a different way, causing a negative length for the second part which wrapped round to large positive because it was unsigned
fixed case 2452: turn-expanded router cannot calculate a route ending on a restricted road
initial fix for case 2219: hill shading is offset; not perfect but an improvement
added support for fling gestures (pan with momentum) to the Android and iOS UI code, and changed the demo programs to use the new system
fixed case 2454: loading a second map enables notices erroneously
added support for turn instruction display
fixed case 2456: casting NaN to integer causes floating point exception on Embarcadero
fixed case 2458: iOS map renderer doesn't handle change from portrait to landscape
added functions to set and get the view state and perspective parameters to all APIs
added functions to serialise the view state and perspective parameters to all APIs
added setters and getters for navigation parameters to all APIs
fixed assertion in CFastPath when a contour had no points
fixed incorrect roundabout exit numbers
fixed case 2468: empty legend causes crash
makemap didn't compile using GCC 8.2.1 because of an incorrect template argument
determination of whether a road was a link was wrong in CRoute::AppendSegment
fixed case 2474: turn instructions are wrong when using CH routing
improved turn instructions for the turn-expanded router
ctm1_info can now suppress layer information and apply an extent
some roofs were not displayed properly (e.g., main dome of St Pauls) because of conversion from double to float causing unexpected comparison result
ctm1_info ran out of memory on map of Britain and Ireland so added 64-bit configuration
fixed case 2477: some building walls missing in 3D mode
added overridable gesture handlers to MapView on Android
fixed case 2483: black background when world map is zoomed out
simplified road type names in the Android SDK and added missing flags and types
fixed case 2482: flickering on Android when perspective angle is 20 degrees
fixed case 2487: some island names are duplicated and many point islands were not converted to polygons
shifts were not applied to the set_int instruction in the import rules language
implemented case 2488: use Zlevels.shp to offset roads by their level when importing Navstreets data
the framework observer is now a weak pointer to avoid dereferencing a freed pointer; fixes case 2489: iOS framework crashes when deallocating the framework

 

Release date: 12th February 2019

Previous release: 5.4, 23rd October 2018

General

Isochrones (travel ranges) now work for the turn-expanded router

Turn-expanded router data can now be stored in serialized form, for fast loading, in CTM1 (map) files

Address data can be added to map objects at data preparation time for use by a new function, GetAddressFast, which uses data only from the map object for which an address is required

 

makemap

Turn-expanded routing data can now be created in serialized form as part of a CTM1 (map) file using /route=t; it is loaded automatically by the framework if present

Different extents can now be applied to different input files by appending the extent, after a comma, to the filename

A new option, /setaddresslayers= adds address data for use by GetAddressFast

Framework API

Added ExpiryDate and AppBuildDate

Added a SetView function which takes a geometry object

Added SetViewToWholeMap, which replaces SetViewToFillMap where present

Added SetViewToRoute

Added InsertPushPin

Added GetAddressFast, which uses information added by the /setaddresslayers makemap option

FindNearestRoad replaces GetNearestTRoad, which is now deprecated, and optionally displays the found position

C++ API

Standard integer types (uint8_t, int32_t, etc.) are used in the public API instead of the equivalent CartoType-specific types (CartoType::uint8, CartoType::int32, etc.), which are now obsolete and used internally only.

Abolished CBitmapGraphicsContext; CGraphicsContext is now a bitmap GC class

 

Changes made during the lifetime of the previous release, 5.4

fixed memory leak caused by failure to delete CNotice objects
fixed case 2365: triangle on boxed label causes hang; parser didn't handle syntactically incorrect labelFormat attribute properly
one overload of readMap in Android was public, not private as it should have been
fixed case 2366: windows demo turns legend on when the style sheet is reloaded
fixed case 2280: when two graphics accelerated windows are open in the Windows demo, one or both redraw slowly
fixed case 1944: (regression) forbidden areas didn't work properly with pedestrian routes
reduced the default vector tile cache size and made it adapt to the number of tiles needed to cover the display; saves about 200Mb of RAM per map on Windows
repeated SVG symbols were drawn in the wrong place in graphics-accelerated mode
fixed case 2369: reloading a style sheet turns off the GL style sheet variable
forbidden areas no longer change the road type to 'unknown', which might prevent some route profiles from working; and overlapping speed restrictions now cause the greater restriction to be used
fixed case 2372: repeated symbols using SVG are sometimes drawn transparently when graphics acceleration is used
fixed cases 2373 and 2376: Android version crashed when creating a RouteProfile or FindParam object
fixed case 2374: access violation with multiple maps on Windows
fixed case 2375: FindAddress suppresses the building number, and returned items are duplicated
fixed case 2385: MapRenderer.Valid() returns false on .NET even if the map renderer is correctly constructed
navigation, rotation and zoom now work properly in the Swift demo
the turn-expanded router now supports forbidden areas
fixed case 2401: findStreetAddresses hangs; simplified complicated clip paths and restricted the maximum internal number of map objects to be found
new feature: changes to the map view are smoothly animated during navigation; animation can also be turned on at other times
fixed case 2406: setting the map view to a map object didn;t work properly when the map was rotated, or in perspective mode
added dependencies to the EGL libraries to the windows demo projects
new feature: changes to the current location, when displayed using the route-vector layer, are smoothly animated
simplified the way the standard style sheet displays the route and vehicle location
headings were not matched properly when finding the nearest road
fixed case 2430: CProj4Projection is not thread safe
made it illegal to create a TBitmap from a CBitmap, to avoid errors caused by using a TBitmap instead of a CBitmap to receive return values from functions returning CBitmap
fixed case 2435: SetLegend causes a crash in .NET
fixed case 2436: crash in iOS when zooming out a lot during navigation
fixed case 2439: and don't always work properly with graphics acceleration
setViewObjects now works correctly in Java

 

Release date: 23rd October 2018

Previous release: 5.2, 12th July 2018

Summary of changes

SetScaleBar, SetLegend, SetCopyright and other new functions allow scale bars, legends (map keys) and copyright notices to be added to the map easily, and to be displayed properly when using hardware graphics acceleration.

Boxed labels for point objects can now optionally have small triangular pointers which indicate the exact position of the point object.

The makemap tool can now write multiple output maps from the same set of input data; any number of pairs of extent and output file name can be provided.

There are geodesic functions (straight-line distance between two points, and the azimuth functions) which use accurate functions based on the WGS84 ellipsoid, not spherical approximations. The spherical approximation is still used internally where speed is more important than accuracy.

The Android API now mostly uses enums, not integer constants.

 

It's possible to use the makemap tool to create very large CartoType maps (CTM1 files), up to and including a map of the whole world using the full OpenStreetMap data file planet.osm. The easiest and fastest way is to use lots of RAM.

... 

CartoType's graphics acceleration system gives you a smooth, fast, fluid user experience, with no delays when panning or zooming the map. Drawing speeds of up to 30 frames per second are supported.

... 

This document explains the CartoTypeRouteProfile XML format, used in .ctprofile files. These files are used to store route profiles, which are used to customize the behavior of the route calculation system. For example, it's possible to make some types of roads more or less preferable than others, or to forbid them entirely, and to set the type of vehicle, for instance to a car, heavy goods vehicle or bicycle.

... 

Here are answers to some questions frequently asked about CartoType.

... 

CartoType uses a standard set of map layers and attributes. These are used by the import rules built into makemap, and by the standard style sheet. You can override them completely by using your own import rules and style sheets, but it is better to use the standard set, adding new layers and attributes where needed, or omitting unnecessary ones. The reason for using the standard set is that they used by the address searching system. In general, attributes and layers are described according to how they are imported from OpenStreetMap data.

... 

Apple introduced the Swift programming language in 2014. It has now largely replaced Objective C to become the language of choice for iOS applications. However, CartoType's iOS API is written in Objective C. This article explains how to use the CartoType iOS SDK in a Swift project. You can use CartoType completely from Swift. There is no need to write any Objective C.

... 

There are several standard platform SDKS. This page tells you what languages they support and the files they consist of.

... 

CartoType uses XML style sheets to control the appearance of maps. Features that can be controlled include the following:

  • selection of layers
  • colors
  • transparency
  • size of features
  • SVG icons
  • lettering style and positioning
  • scales at which features appear

Style Sheets Directory

You can create CartoType maps (CTM1 files) from OpenStreetMap data, ESRI shapefiles, SRTM elevation data and other sources using the makemap tool.

... 

fast offline routing

The standard routing system, suitable for any maps on desktop platforms and servers, and city maps on mobile devices, is flexible and fast.

route profiles

Route profiles tell CartoType how fast you expect to travel on different types of road, and also allow you to add weightings to indicate your preference. The free Maps app, available for Windows, Mac OS X and Linux, provides an easy way to try out different route profiles. You can choose from four standard profiles, and an editable custom profile, using the Route menu (first image below). The command 'Edit Custom Route Profile...' brings up the Route Profile Editor dialog (second image below).

... 

CartoType can show terrain on a map in various different ways:

height coloring: using different colors for different heights. Colors can be blended or drawn as distinct steps. All this is controlled using a height ramp in the style sheet.

nz terrain height coloring

... 

We supply a full Android Java API for CartoType which provides the same functionality as the C++ API. The SDK, which you can download here, includes an AAR file (Android library) which you can easily add to your Android Studio project. You can also access a sample CartoType project, which contains the source code and project files for a simple program called TestGL, which displays a map using CartoType's hardware graphics acceleration system.

Use the free Android Studio IDE for developing Android applications.

... 

The usual way to develop apps for iOS, the operating system used on Apple's iPhone and iPad devices, is by means of XCode, a free development environment which runs on Mac OS. We provide an iOS framework for CartoType. It allows you to use both Swift and Objective C to create CartoType apps.

A simple test app

You can download the source code of a simple test app which uses the CartoType evaluation library.

First get the test project source files for either Swift or Objective C.

Open the project in Xcode on a Macintosh.

Add the CartoType evaluation framework to the project.

Add the map, style sheet and font to the project.

You can then run it in the simulator or on an iOS device. The CartoType evaluation library is built for, and works on, both the 32-bit (Arm7) and 64-bit (Arm64) iOS environments.

The code is largely self-explanatory. It loads and displays a map, and allows the user to pan, zoom and rotate the map using gestures. You can create a route by clicking successively on two points It is designed as a minimal app, and therefore is deliberately very simple.

... 

C++ Basics

The CartoType core library is written in C++. To use it to draw maps you need to create various class objects. All CartoType functionality is accessed by calling member functions of those objects.

C++ programming conventions

Names

CartoType class names nearly all start with C or T. C stands for 'class' or 'complicated' and is for large classes which allocate memory on the heap, and which are usually created on the heap. T stands for 'type' and is for smaller, simpler classes which are usually created on the stack. Examples: CEngine, TResult.

... 

Expressions are used in import rules and style sheets.

Use in style sheets

They are used in <if> and <condition> elements. You write them using the exp attribute. For example:

<if exp='scale > 50000'>
<condition exp='$="Italy"'>

You can use the special variables Type, OsmType and RoadType in style sheet expressions. Type is the integer type, OsmType is the same as (Type bitand #FFFE0000), and RoadType is the same as (Type bitand #FC0). For example,

<condition exp='OsmType == "cit"'><condition exp='OsmType == "cit"'>

...