Map Styles

Service version: 1
Last edit: 2024.01.30

Purpose

The Maps API Resource service delivers resources required to display vector maps. The service consists of the:

  • Metadata method: This retrieves a list of resources of a selected type.
  • Resource method: This retrieves a selected resource.
  • Merged style method: This retrieves a merged style depending on the passed params.
  • Merged sprite method: This retrieves a merged sprite depending on the passed params.

Request data

Metadata method

HTTPS method: GET

Please see the following Request parameters section with the required and optional parameters tables for these values. The generic URL format is as follows.

URL format

get
Request URL
https://{baseURL}/map/{versionNumber}/{resourceType}/{resourceVersion}/{resourceVariant}/metadata.{format}?key={Your_API_Key}

Examples

get
Example request URLs
1https://api.tomtom.com/map/1/style/metadata.xml?key={Your_API_Key}
2
3https://api.tomtom.com/map/1/sprite/20.0.0-8/metadata.json?key={Your_API_Key}
4
5https://api.tomtom.com/map/1/glyph/20.0.0-8/metadata.jsonp?key={Your_API_Key}

curl command format

get
Request curl command
curl 'https://api.tomtom.com/map/1/sprite/20.0.0-8/metadata.json?key={Your_API_Key}'

Request parameters (Metadata method)

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.

Required parameters

Description

baseURL


string

Base URL for calling TomTom services.


Value: api.tomtom.com

versionNumber


string

The version of the service to call.


Value: The current version is 1.

resourceType


string

The type of the requested resource.


Values:

  • style

  • sprite

  • glyph

format


string

The requested response format.


Values:

  • xml

  • json

  • jsonp

key


string

The authorization key for access to the API.


Value: Your valid API Key.

Optional parameters

Description

resourceVersion


string

Version of the requested resource. If the version string contains a wildcard, the latest matching version of the resource will be provided.


Values:

  • A version.
  • A partial version ending with a wildcard character, e.g., *, 20.*, 20.0.2-*.

resourceVariant


string

Variant of the requested resource. Can only be used when **resourceVersion** is provided.


Value: The variant name.

Resource method

HTTPS method: GET

Please see the following Request parameters section with the required and optional parameters tables for these values. The generic URL format is as follows.

URL format

get
Request URL
https://{baseURL}/map/{versionNumber}/{resourceType}/{resourceVersion}/{resourceVariant}/{resourceName}?key={Your_API_Key}

Examples

get
Example request URL
https://api.tomtom.com/map/1/style/20.0.0-8/basic_main.json?key={Your_API_Key}
get
Example request URL
https://api.tomtom.com/map/1/sprite/20.0.0-8/lite/sprite.png?key={Your_API_Key}

curl command format

get
Request curl command
curl 'https://api.tomtom.com/map/1/style/20.0.0-8/basic_main.json?key={Your_API_Key}'

Request parameters (Resource method)

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.

Required parameters

Description

baseURL


string

Base URL for calling TomTom services


Value: api.tomtom.com

versionNumber


string

The version of the service to call.


Value: The current version is 1.

resourceType


string

The type of the requested resource.


Values:

  • style

  • sprite

  • glyph

resourceVersion


string

The version of the requested resource. If the version string contains a wildcard, the latest matching version of the resource will be provided. Available versions can be listed using the Metadata method.


Values:

  • A version.
  • A partial version ending with a wildcard character, e.g., *, 20.*, 20.0.2-*.

resourceName


string

The requested resource name (with an extension if applicable). Available resources can be listed using the Metadata method.


Value: A resource name.

key


string

Authorization key for access to the API.


Value: Your valid API Key.

Optional parameters

Description

resourceVersion


string

Version of the requested resource. If the version string contains a wildcard, the latest matching version of the resource will be provided.


Values:

  • A version.
  • A partial version ending with a wildcard character, e.g., *, 20.*, 20.0.2-*.

resourceVariant


string

The variant of the requested resource. Available variants can be listed using the Metadata method.


Value: For example, tomtom

Merged style method

HTTPS method: GET

  • Constants and parameters enclosed in curly brackets { } must be replaced with their values.
  • Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.

URL format

get
Request URL
https://{baseURL}/style/{versionNumber}/style/{resourceVersion}?key={Your_API_Key}&map={map_style}&traffic_incidents={traffic_incident_style}&traffic_flow={traffic_flow_style}&poi={poi_style}

Examples

get
Example request URLs
1https://api.tomtom.com/style/1/style/20.3.4-6?key={Your_API_Key}&map=basic_main&traffic_incidents=incidents_night&traffic_flow=flow_absolute&poi=poi_main
2
3https://api.tomtom.com/style/1/style/20.3.2-3?key={Your_API_Key}&map=basic_night&traffic_incidents=incidents_night
4
5https://api.tomtom.com/style/1/style/20.3.2-3?key={Your_API_Key}&traffic_incidents=incidents_s0&traffic_flow=flow_relative0

curl command format

get
Request curl command
curl 'https://api.tomtom.com/style/1/style/20.3.2-3?key={Your_API_Key}&traffic_incidents=incidents_s0&traffic_flow={low_relative0'

Request parameters (Merged style method)

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.

Required parameters

Description

baseURL


string

Base URL for calling TomTom services.


Value: api.tomtom.com

versionNumber


string

The version of the service to call.


Value: The current version is 1.

resourceVersion


string

Version of the requested resource. Must be newer than or equal to 20.3.2-3. If the version string contains a wildcard, the latest matching version of the resource will be provided.


Values:

  • A version.
  • A partial version ending with a wildcard character, e.g., *, 20.*, 20.3.2-*.

key


string

The authorization key for access to the API.


Value: Your valid API Key.

Optional parameters

Description

map


string

Map style name to be used for merged style.


Values: See Available map styles.

traffic_incidents


string

Traffic incidents style name to be used for merged style.


Values: See Available incidents styles.

traffic_flow


string

Traffic flow style name to be used for merged style.


Values: See Available flow styles.

poi


string

POI style name to be used for merged style.


Values: See Available POI styles.

Available Map styles

Name

Available since

Available until

basic_main20.3.2-3 -
basic_night20.3.2-3 -
basic_main-lite20.3.2-3 -
basic_night-lite20.3.2-3 -
hybrid_main20.3.2-3 -
hybrid_night20.3.2-3 -
hybrid_main-lite20.3.2-3 -
hybrid_night-lite20.3.2-3 -
labels_main20.3.2-3 -
labels_night20.3.2-3 -
labels_main-lite20.3.2-3 -
labels_night-lite20.3.2-3 -

Available Incidents styles

Name

Available since

Available until

incidents_day20.3.2-3 -
incidents_dark20.3.2-3 -
incidents_night20.3.2-3 -
incidents_s020.3.2-3 -
incidents_s0-dark20.3.2-3 -
incidents_s120.3.2-3 -
incidents_s220.3.2-3 -
incidents_s320.3.2-3 -

Available Flow styles

Name

Available since

Available until

flow_absolute20.3.2-3 -
flow_reduced-sensitivity20.3.2-3 -
flow_relative-delay20.3.2-3 -
flow_relative020.3.2-3 -
flow_relative0-dark20.3.2-3 -

Available POI styles

Name

Available since

Available until

poi_main20.3.4-6 -
poi_dynamic20.4.5-8 -

Merged sprite method

HTTPS method: GET

Please see the following Request parameters section with the required and optional parameters tables for these values. The generic URL format is as follows.

URL format

get
Request URL
https://{baseURL}/style/{versionNumber}/sprite/{resourceVersion}/{type}?key={Your_API_Key}&map={map_style}&traffic_incidents={traffic_incident_style}&traffic_flow={traffic_flow_style}&poi={poi_style}

Examples

get
Example request URL
1https://api.tomtom.com/style/1/sprite/20.3.4-6/sprite.png?key={Your_API_Key}&map=basic_main&traffic_incidents=incidents_s0&traffic_flow=flow_relative0&poi=poi_main
2
3https://api.tomtom.com/style/1/sprite/20.3.2-3/sprite@2x.json?key={Your_API_Key}&map=basic_night&traffic_incidents=incidents_s0-dark
4
5https://api.tomtom.com/style/1/sprite/20.3.2-3/sprite@2x.png?key={Your_API_Key}&traffic_incidents=incidents_s1&traffic_flow=flow_relative0-dark

curl command format

get
Request curl command
curl 'https://api.tomtom.com/style/1/sprite/20.3.2-3/sprite.json?key={Your_API_Key}&traffic_incidents=incidents_s1&traffic_flow=flow_relative0-dark'

Request parameters (Merged sprite method)

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.

Required parameters

Description

baseURL


string

Base URL for calling TomTom services.


Value: api.tomtom.com

versionNumber


string

The version of the service to call.


Value: The current version is 1.

resourceVersion


string

Version of the requested resource. Must be newer than or equal to 20.3.2-3. If the version string contains a wildcard, the latest matching version of the resource will be provided.


Values:

  • A version.
  • A partial version ending with a wildcard character, e.g., *, 20.*, 20.3.2-*.

type


string

The requested type of data.


Values:

  • sprite.png

  • sprite@2x.png

  • sprite.json

  • sprite@2x.json

key


string

The authorization key for access to the API.


Value: Your valid API Key.

Optional parameters

Description

map


string

Map style name to be used for merged sprite.


Values: See available map styles.

traffic_incidents


string

Traffic incidents style name to be used for merged sprite.


Values: See available incidents styles.

traffic_flow


string

Traffic flow style name to be used for merged sprite.


Values: See available flow styles.

poi


string

POI style name to be used for merged sprite.


Values: See available poi styles.