Map Styles
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
https://{baseURL}/map/{versionNumber}/{resourceType}/{resourceVersion}/{resourceVariant}/metadata.{format}?key={Your_API_Key}
Examples
1https://api.tomtom.com/map/1/style/metadata.xml?key={Your_API_Key}23https://api.tomtom.com/map/1/sprite/20.0.0-8/metadata.json?key={Your_API_Key}45https://api.tomtom.com/map/1/glyph/20.0.0-8/metadata.jsonp?key={Your_API_Key}
curl command format
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 |
---|---|
string | Base URL for calling TomTom services. Value: |
string | The version of the service to call. Value: The current version is |
string | The type of the requested resource. Values:
|
string | The requested response format. Values:
|
string | The authorization key for access to the API. Value: Your valid |
Optional parameters | Description |
---|---|
string | Version of the requested resource. If the version string contains a wildcard, the latest matching version of the resource will be provided. Values:
|
string | Variant of the requested resource. Can only be used when
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
https://{baseURL}/map/{versionNumber}/{resourceType}/{resourceVersion}/{resourceVariant}/{resourceName}?key={Your_API_Key}
Examples
https://api.tomtom.com/map/1/style/20.0.0-8/basic_main.json?key={Your_API_Key}
https://api.tomtom.com/map/1/sprite/20.0.0-8/lite/sprite.png?key={Your_API_Key}
curl command format
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 |
---|---|
string | Base URL for calling TomTom services Value: |
string | The version of the service to call. Value: The current version is |
string | The type of the requested resource. Values:
|
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:
|
string | The requested resource name (with an extension if applicable). Available resources can be listed using the Metadata method. Value: A resource name. |
string | Authorization key for access to the API. Value: Your valid |
Optional parameters | Description |
---|---|
string | Version of the requested resource. If the version string contains a wildcard, the latest matching version of the resource will be provided. Values:
|
string | The variant of the requested resource. Available variants can be listed using the Metadata method. Value: For example, |
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
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
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_main23https://api.tomtom.com/style/1/style/20.3.2-3?key={Your_API_Key}&map=basic_night&traffic_incidents=incidents_night45https://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
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 |
---|---|
string | Base URL for calling TomTom services. Value: |
string | The version of the service to call. Value: The current version is |
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:
|
string | The authorization key for access to the API. Value: Your valid |
Optional parameters | Description |
---|---|
string | Map style name to be used for merged style. Values: See Available map styles. |
string | Traffic incidents style name to be used for merged style. Values: See Available incidents styles. |
string | Traffic flow style name to be used for merged style. Values: See Available flow styles. |
string | POI style name to be used for merged style. Values: See Available POI styles. |
Available Map styles
Name | Available since | Available until |
---|---|---|
basic_main | 20.3.2-3 | - |
basic_night | 20.3.2-3 | - |
basic_main-lite | 20.3.2-3 | - |
basic_night-lite | 20.3.2-3 | - |
hybrid_main | 20.3.2-3 | - |
hybrid_night | 20.3.2-3 | - |
hybrid_main-lite | 20.3.2-3 | - |
hybrid_night-lite | 20.3.2-3 | - |
labels_main | 20.3.2-3 | - |
labels_night | 20.3.2-3 | - |
labels_main-lite | 20.3.2-3 | - |
labels_night-lite | 20.3.2-3 | - |
Available Incidents styles
Name | Available since | Available until |
---|---|---|
incidents_day | 20.3.2-3 | - |
incidents_dark | 20.3.2-3 | - |
incidents_night | 20.3.2-3 | - |
incidents_s0 | 20.3.2-3 | - |
incidents_s0-dark | 20.3.2-3 | - |
incidents_s1 | 20.3.2-3 | - |
incidents_s2 | 20.3.2-3 | - |
incidents_s3 | 20.3.2-3 | - |
Available Flow styles
Name | Available since | Available until |
---|---|---|
flow_absolute | 20.3.2-3 | - |
flow_reduced-sensitivity | 20.3.2-3 | - |
flow_relative-delay | 20.3.2-3 | - |
flow_relative0 | 20.3.2-3 | - |
flow_relative0-dark | 20.3.2-3 | - |
Available POI styles
Name | Available since | Available until |
---|---|---|
poi_main | 20.3.4-6 | - |
poi_dynamic | 20.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
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
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_main23https://api.tomtom.com/style/1/sprite/20.3.2-3/sprite@2x.json?key={Your_API_Key}&map=basic_night&traffic_incidents=incidents_s0-dark45https://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
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 |
---|---|
string | Base URL for calling TomTom services. Value: |
string | The version of the service to call. Value: The current version is |
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:
|
string | The requested type of data. Values:
|
string | The authorization key for access to the API. Value: Your valid |
Optional parameters | Description |
---|---|
string | Map style name to be used for merged sprite. Values: See available map styles. |
string | Traffic incidents style name to be used for merged sprite. Values: See available incidents styles. |
string | Traffic flow style name to be used for merged sprite. Values: See available flow styles. |
string | POI style name to be used for merged sprite. Values: See available poi styles. |