The Toll Roads overlay visualizes segments on which toll costs are charged in general. By default toll for all types of vehicles is shown, but the overlay style can be adapted to any specific vehicle type. The data is not time-dependent and does not contain any exact toll costs.
API endpoint
You need the following API endpoint to request toll:
https://api.myptv.com/maps/overlays/v1/vector-tiles/
Request
For a single tile showing Karlsruhe, Germany specify the map tile path with zoomLevel
, x
and y
as shown below.
You can test this by entering the URL into your web browser. Be sure to replace YOUR_API_KEY
with your actual API key.
https://api.myptv.com/maps/overlays/v1/vector-tiles/11/1072/703?layers=toll&apiKey=YOUR_API_KEY
Response
The call result is a single map tile in MapBox Vector Tiles format.
Tile content
The requested vector tile contains data which is listed in this table. The individual columns are explained below.
Name of content | Type |
geometry | SRID 3857 |
feature_types | integer array |
display_category | integer |
truck | boolean |
car | boolean |
bus | boolean |
motorcycle | boolean |
pedestrian | boolean |
delivery | boolean |
emergency_vehicle | boolean |
through_traffic | boolean |
Feature Type
The feature types describe the different types of toll when traversing a road segment.
Feature Type | Description |
1 | Toll Road |
2 | Bridge |
3 | Tunnel |
4 | Park |
5 | Mountain Pass |
6 | Scenic Route |
7 | Vignette Road |
8 | Toll Zone |
9 | Ferry |
Display Category
Defines the importance of a road segment that contains toll. Road segments with a high priority are displayed earlier than road segments with a lower priority.
Display Category | Description |
1 | The most important road segments like motorways and two-lane federal highways |
2 | Road segments of medium importance like single-lane federal highways or land roads |
3 | All other road segments |
Transportation Types
The transportation types describe what vehicles are billed on specific road segment, represented by boolean attributes: car, truck, bus, motorcycle, pedestrian, delivery, emergency_vehicle and through_traffic.
Styling
Toll roads are drawn as purple lines.
Layer names
Our predefined layer styles have a recurring naming scheme. All toll layer start with TSP_Toll_
.
Layer name | Description |
TSP_Toll_Major_Outer/TSP_Toll_Major_Inner | Draws the toll segments on major priority roads |
TSP_Toll_Medium_Outer/TSP_Toll_Medium_Inner | Draws the toll segments on medium priority roads |
TSP_Toll_Minor_Outer/TSP_Toll_Minor_Inner | Draws the toll segments on minor priority roads |
How to implement
The tutorial on how to integrate overlays into a Vector Map also addresses toll roads.