[mapserver-users] Characters breaks variable substitution in TEXT parameter
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Mar 28 06:07:32 PDT 2020
Hi Nicol,
I have just tested this locally and the following does work:
TEXT "[attribute1] - [attribute2] - [attribute3]"
as well as
TEXT "[attribute1]-[attribute2]-[attribute3]"
Both produce expected map/label results with shp2img. I am testing with
MS4W 4.0.3 (MapServer 7.6.0-dev).
You can see my mapfile (I use inline features, so you could even paste
the feature locally to test):
https://ms4w.dev/text-multiple/text-multiple.map
Here is the map output:
https://ms4w.dev/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-text-multiple/text-multiple.map&layers=all&mode=browse&template=openlayers
Hope I am understanding your question properly. And good morning from
the east coast of Canada,
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
On 2020-03-28 7:25 a.m., Nicol Hermann wrote:
> Hello,
>
> I want to use the TEXT parameter within a CLASS LABEL block to label
> features with multiple fields.
>
> CLASS
> LABEL
> TEXT "[frist] [second] [third]"
> COLOR 0 0 0
> FONT "arial"
> ...
> END
> END
>
> I found that any character in between the specified fields of the TEXT
> keyword breaks the substitution of the fields.
>
> This works
> TEXT "[frist] [second] [third]"
>
> Does not work (the output is: '2 - [second] - [third]')
> TEXT "[frist] - [second] - [third]"
>
> Does not work either (same out like above just with line breaks)
> TEXT "[frist] - [second] - [third]"
> WRAP '-'
>
> Any idea how to concatenate text with substitutes from multiple field?
> In the ideal case in combination with the WRAP parameter.
>
> Thanks
> Nicol
>
>
More information about the MapServer-users
mailing list