CartoType can be used to display maps created from Mapbox vector tiles, allowing you to display a map of the whole world down to street level with routing and geocoding.

How to open a map using Mapbox data

First you'll need a Mapbox account. Then you need to create an access token. Using your access token, you can open a Mapbox map of the world in almost the same way as opening a CartoType map file (a .CTM1 file). Instead of the filename, you supply the Mapbox vector tile URL:

https://api.mapbox.com/v4/mapbox.mapbox-streets-v8

and set the Key parameter in the CartoType framework parameter object to your access key.

You will need internet access for this system to work, because it downloads map data from the Mapbox server.

Mapbox data works on the following CartoType platforms: Windows, .NET, Android, Linux, iOS and macOS.

Details

Styling: Mapbox data is converted automatically into layers that work properly with the standard CartoType style sheet. You do not need to create a different style sheet to use Mapbox data.

Route calculation: The Mapbox routing system supplies four built-in profiles: Driving-Traffic, Driving, Walking and Cycling. The difference between the first two is that Driving-Traffic takes account of current traffic conditions. These profiles are supplied in the normal way by the BuiltInProfile and BuiltinProfileCount functions of the CartoType Framework class.

Address searching: If you supply at least a street name, address searching uses the Mapbox forward geocoding system.

Converting a point to an address (reverse geocoding): CartoType's GetAddress function, taking a geographical point, uses the Mapbox reverse geocoding system to convert it to an address.

Temporary and permanent geocoding: compliance with Mapbox terms of service

If you use address searching or conversion of a point to an address you must comply with the Mapbox terms of service. In particular, if you intend to cache the results or store them permanently you must call CartoType's Framework::SetProviderParam function (or Framework.setProviderParam, etc., according to the SDK) in this way:

SetProviderParam("mapbox/geocoding/permanent","true")

ensuring that the "permanent=true" parameter is set in the URL passed to the Mapbox server.

See the Mapbox geoding documentation, which includes the following statement: "Using Permanent storage with the Geocoding API requires that you have a valid credit card on file or an active enterprise contract."

This applies to calling the following CartoType functions:

C++:

Framework::FindAddress
Framework::FindAddressAsync
Framework::GetGeoCodeSummary (taking a geographic point)
Framework::GetAddress (taking a geographic point)

.NET

Framework.FindAddress
Framework.FindAddressAsync
Framework.GeoCodeSummary (taking a geographic point)
Framework.GetAddress (taking a geographic point)

Android

Framework.findAddress
Framework.findAddressAsync
Framework.geoCodeSummary (taking a geographic point)
Framework.getAddress

 iOS

CartoTypeFramework.find: maxItems: address: fuzzy:
CartoTypeFramework.findAddressAsync
CartoTypeFramework.geoCodeSummary
CartoTypeFramework.getAddress: point: coordType: