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).


Using the FreeBSD operating system, a version of Unix, you can create larger CTM1 files than is usually possible under Windows, depending on how much RAM you have.

Installing FreeBSD

Basic Installation

It's assumed you know how to install an operating system, so this part will be brief. You can download the latest version of FreeBSD from, burn it on a CD and boot from it. Make sure you download the AMD64 version, not the Intel386 as the latter is only 32-bit. The AMD64 instruction set appeared before Intel's own 64-bit processors so the 64-bit version is named for them (which must annoy Intel).

Different versions of FreeBSD ask different install questions but you can leave it to the default options selected most of the time.