Changes affecting all APIs

Gradients can be used in routing

You can add gradients to route data using the makemap command-line options /route=ag (A-star routing with gradients) or /route=cg (contraction hierarchy routing with gradients). For this to work you have to load the elevation data from USGS .hgt files using the /usgs option. For more details about the /usgs option see the main article about creating maps.

If you add gradients, one of eight gradients (flat or slight, gentle, steep and very steep, each in an uphill or downhill varient) is stored for every route segment. You can add speed weightings and bonuses to the route profile for the gradients, and specify which road types the gradient weightings apply to.

Loading and saving routes

Route objects now contain the route profile used to create them, which means you no longer have to specify a profile when saving a route. You can now load or save routes in files or strings, and you can load routes from GPX files, in which case the GPX track is converted to a legal route. All route loading and saving functions allow you to use either .ctroute or GPX format.

Layer names

You can get all the layer names in a single array using a new LayerNames or layerNames function.

Changes to the C++ API

Smart pointers

Functions creating objects (e.g., New functions, LoadMapObject) now return std::unique_ptr, not a raw pointer. This makes it much easier to manage their lifetimes.

String properties

String properties like Name, Locale and Proj4Param that were formerly returned as const char* are now returned as std::string, making it easier to write safe code.

Setting camera parameters in perspective view

The new SetPerspective overload takes a TPerspectiveParam object which allows you to set camera height, angle, rotation, field of view and other parameters.

Framework observers

Framework observers are now supported, primarily for use by CartoType GL.

Multiple framework observers are now supported: AddObserver and RemoveObserver replace SetObserver.

Changes to the Android Java API

Framework observers

Framework observers are now supported, primarily for use by CartoType GL.