Red road with restriction for trucks

Within this forum we want to offer discussions all around our .NET based Map control including all .Net-language specific questions concerning calls of the xServer-API. Attention: xServer-relevant concepts can be found in further forums such as xRoute or xTour.
Post Reply
mnawias
Posts: 13
Joined: Fri Nov 06, 2020 12:15 pm

Red road with restriction for trucks

Post by mnawias »

To show restriction signs on map we add PTV_TruckAttributes to LabelTehemes (formsMap1.Xmap2LayerFactory.LabelThemes.Add("PTV_TruckAttributes");. But when we add this, API adds on map not only restriction signs, it also draws red road on road with restrictions for trucks. So we tried adding dimensions and weight in default.xml.

Code: Select all

<weight emptyWeight="1.0" loadWeight="1.0" totalPermittedWeight="2.0"/>
<dimensions height="1.0" heightAboveFrontAxle="1.0" length="1.0" width="1.0"/>.
We thought that it would help, but it doesn't. Is there any way to display only restriction signs without red roads?
Attachments
red_roads.PNG
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Red road with restriction for trucks

Post by Bernd Welter »

Hello Nawias,

I don't think the desired visualization is possible with xMap (and frameworks on top of xMap). The only levels of manipulation Iin xMap2 I know are
  • Change the overall profile of the map (Gravelpit, Sandbox, Silkysand, ...) which has an impact on the color scheme of texts, streets, towns, woods and so on
  • Client side rendering of the icons themselves as shown in the showcase but this is limited to he icons and does NOT cover the polygon lines.
    spiral.png
I forwarded your post to Oli/Isabel for a comment.
Let's see!

Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Red road with restriction for trucks

Post by Bernd Welter »

Hello Nawias,

I made some experiments with my local instance of v2.22. I changed the /profiles/rendering/featurelayer/fl_truckattributes.xml as follows:
I replaced "<stroke color="#FF0000" opacity="100" width="90%"/>" with "<stroke color="#FF0000" opacity="0" width="90%"/>" various times. Now the inner city of Warszaw looks different:
left: xServer Internet with default settings for PTV_TruckAttributes<br />right: my local version with the transparent lines
left: xServer Internet with default settings for PTV_TruckAttributes
right: my local version with the transparent lines
Does this solve the problem? This is obviously a hack that works in an on premise system.
Haven't tried to apply this via request.

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
mnawias
Posts: 13
Joined: Fri Nov 06, 2020 12:15 pm

Re: Red road with restriction for trucks

Post by mnawias »

Yes this solved the problem. But we replaced <stroke color="#FF0000" opacity="100" width="90%"/>" with <stroke color="#FF0000" opacity="0" width="90%"/>" and
<stroke color="#FF0000" opacity="100" width="100%"/>" with <stroke color="#FF0000" opacity="0" width="100%"/>.

But it’s weird, early we’ve got information form you that it’s impossible to turn off red road.
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Red road with restriction for trucks

Post by Bernd Welter »

Hello Nawias,

Yes you are right - unfortunately I was too stuck into "how to deal with this on API level" and it took several colleagues and rounds to find this (compareably simple) solution.

Luckily we were able to solve it now and I am thankful you triggered this via the forum where other users can benefit from it, too. Wielkie dzięki za to!

Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply