we use PTV (xServer2.27) as GIS for third party software which we have some (but limited) options do modify.
Can we add featureLayerProfile in profile.xml?
Im getting error:
Code: Select all
"message": "Could not parse profile. Reason: Error at line 62, column 11: element 'featureLayerProfile' is not allowed for content model '(description?,vehicleProfile?,featureLayerProfile?,routingProfile?,renderingProfile?,clusterPlanningProfile?)'."
When default profile is used and I only modify (append requestProfile-featureLayerProfile-themes) the request - then the response is OK and blocked roads are shown.
In more detail:
Customer requests using PTV_TrafficIncidents to not route trough closed roads.
Mentioned third party software uses following modules:
- xDima
- xMap
- xRoute
In order to modify behaviour of all three modules at one place - and keep them providing same results (ie. when dima calculate route avoiding closed road, then additional xroute request should avoid this closed road too) I would like to insert featureLayerProfile into profile.xml instead of (maybe impossible for us) modification of xDima/xMap/xRoute requests from third party application.
Ive managed to set up ContentUpdateService and via RawRequest runner Im able to modify requests (adding requestProfile) - and it is working correctly (map shows blocked roads)
Code: Select all
{
"mapSection": {
"$type": "MapSectionByCenter",
"centerCoordinate": {
"x": 15.055,
"y": 50.750
},
"zoom": 13
},
"imageOptions": {
"width": 1280,
"height": 800
},
"storedProfile": "classic",
"requestProfile": {
"featureLayerProfile": {
"themes": [
{
"id": "PTV_TrafficIncidents",
"enabled": "true"
}
]
}
}
}
See attached file default2.xml
Without last section:
Code: Select all
<featureLayerProfile>
<themes id="PTV_TrafficIncidents" enabled="true" />
</featureLayerProfile>
At the end of the post is request which i run in RawRequestRunner of PTV xserver2.
(Route should avoid the main road, which is closed for last 1 or 2 years - as first map request in this post shows that road is blocked)
Please can you advise if I can modify profile.xml instead of adding RequestProfile to each of request to xmap/xroute/xdima?
Thank you
Code: Select all
{
"storedProfile": "default2",
"coordinateFormat": "EPSG:4326",
"waypoints": [
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 15.0531983,
"y": 50.7412225
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 15.0728858,
"y": 50.7478147
}
}
}
],
"routeOptions": {},
"requestProfile": {},
"resultFields": {
"eventTypes": [],
"polyline": "true"
}
}