Page 1 of 1

Red road with restriction for trucks

Posted: Wed Apr 07, 2021 9:55 am
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?

Re: Red road with restriction for trucks

Posted: Wed Apr 07, 2021 3:41 pm
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

Re: Red road with restriction for trucks

Posted: Thu Apr 08, 2021 8:25 am
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

Re: Red road with restriction for trucks

Posted: Thu Apr 08, 2021 12:25 pm
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.

Re: Red road with restriction for trucks

Posted: Thu Apr 08, 2021 1:03 pm
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