Release date: 12th February 2019

Previous release: 5.4, 23rd October 2018


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



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


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.


C++ API for Windows, Linux, Qt and other platforms supporting C++ development

Java API for Android

.NET API for C#, Visual Basic and other .NET languages

Objective C API for iOS (iPhone and iPad) and MacOS

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.



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


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"'>


Building CartoType for Linux

CartoType is written in standard C++ and will compile using CLANG and GCC. Its output is a bitmap in memory, which you can display on any device if you know how your proposed device handles bitmaps. The license allows you to distribute it as part of a binary package, not as source for on-platform compilation. Linux users tend to expect binary packages, so this should not be a problem.

To obtain a Linux library you can simply take the source code, which is supplied to Cartotype licensees, and compile it (using a script provided as part of the CartoType distribution) on the target you need. If you need the library pre-compiled for any reason please This email address is being protected from spambots. You need JavaScript enabled to view it.. The library being binary, it obviously matters what kind of processor you're using (Intel, AMD64, ARM, SPARC and so on).