How to display TunnelRestrictionCodes in xMap?

This forum covers all questions dealing with visualization of data within the native PTV xMap interface. Please remember that additional plugins such as AJAX or Leaflet may be handeled in other forums.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

How to display TunnelRestrictionCodes in xMap?

Post by Bernd Welter »

Hello together,

today I tried to visualize TunnelRestrictionCodes via xMap. Voila - it works. Under the following conditions:
- you have to request the truckAttributes via the RoadEditor layer
- you have to use a render.ini file that contains the following

Code: Select all

[Roadeditor.TunnelRestriction]
Color=255
Transparency=0
UnderStreet=true
AmountWidthFactor=2.000000
AmountDisplacementFactor=0.000000
MaximumScale=12.50000
#DefaultBitmap=DefaultHazardousGoods
DefaultBitmap=DefaultTunnelRestriction
The current version of xMap uses DefaultBitmap=DefaultHazardousGoods. For a proper icon you have to update the value to DefaultBitmap=DefaultTunnelRestriction.
Shows the tunnel with a proper symbol!
Shows the tunnel with a proper symbol!
Kind regards Bernd
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: How to display TunnelRestrictionCodes in xMap?

Post by Bernd Welter »

Meanwhile I also identified some non-100 tunnels. Here is an example:
The object infos (coordinates in Mercator, used map PTV_Europe_City_Map_Premium_2014_1T):

Code: Select all

<ns2:LayerObject loId="0" hiId="0" descr="TUNNEL_RESTRICTION|2=110">
<ns2:pixel y="318.0" x="531.0"/>
<ns2:ref>
<ns1:point y="6769272.395629" x="481785.68898699805"/>
</ns2:ref>
</ns2:LayerObject>
So with this information you can drive through or pass the tunnel using the Road Editor:
ROADEDITOR_ADDITIONAL_OPTIONS=TUNNEL_RESTRICTION=110 (through)
ROADEDITOR_ADDITIONAL_OPTIONS=TUNNEL_RESTRICTION=140 (pass)

WaypointCoords:
480430 / 6769023 = Start
483757 / 6770017 = Destination

Regards from Germany,

Bernd
Attachments
Tunnel avoided, vehicle has higher code
Tunnel avoided, vehicle has higher code
Tunnel is used, vehicle has equal code
Tunnel is used, vehicle has equal code
Post Reply