Displaying Feature Layer PTV_TruckAttributes
The Feature Layer theme PTV_TruckAttributes provides additional restrictions that can be considered for your vehicle The term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition..
PTV_TruckAttributes provide data to calculate and display exact routes A route corresponds to a path of a vehicle through the underlying transport network. The main attributes of a route are the distance and the time that the vehicle travels along the path. for extraordinary vehicles, for example vehicles exceeding the conventional height. It contains restrictions like maximum height of a tunnel, maximum weight allowed for bridges or restricted zones for vehicles carrying hazardous load. These restrictions are stored for single route segments and are considered depending on vehicle properties from the routing profile A profile is a collection of parameters used to configure the request. Full profiles consist of a number of specialized sub-profiles like the VehicleProfile which describes the properties of a vehicle..
This article explains how to visualize TruckAttributes on a map.
Using TruckAttributes you can
- obtain better routing results by taking additional road restrictions relevant to your vehicle into account,
- query and examine restrictions on any road segment,
- visualize such restrictions on the map.
Check if the following prerequisites are fulfilled before you start with the use case:
- Installed and licensed PTV xMap Server
- Installed PTV Map
- Installed and licensed Feature Layer theme PTV_TruckAttributes
- Feature Layer
Feature Layers provide additional content to enrich PTV maps, such as vehicle-dependent restrictions on roads, or even live traffic information. These data may, for example, help to improve routing results.
Various Feature Layer themes providing different kinds of content are available. Several Feature Layer themes may be used in combination.
When using the REST REST (Representational State Transfer) represents a World Wide Web paradigm, consisting of constraints to the design of components which results in a better performance and maintainability. API to build a tiled map, the REST operation tile is part of the following URL, by means individual tiles can be requested:
Concrete values in URL template have to be defined for zoomlevel, x and y coordinates, specifying the map section of the corresponding tile.
To display PTV_TruckAttributes on a map with common content, the parameter
layers has to be specified in the URL enabling all base layers
To obtain a map which contains only PTV_TruckAttributes, the parameter
layers has to be specified in the URL enabling only
In the example below, which is based on the one from Displaying a Basic Interactive Map, TruckAttributes are displayed on a tiled map using the Leaflet toolkit:
The following topics might be relevant for this use case.