Hi

So I have made a contour plot from a raster. Works nicely.
Then I added labels to give context to the contours. Fine.
Now I want to format the labels.

I have found this post https://gis.stackexchange.com/questions/350089/round-number-for-label-in-mapserver suggesting a syntax:
TEXT (tostring(([SQKM]),"%.0f")+" km2")

Nice, but I use mapscript. And I do not understand nor find any examples how I could do this with mapscript
I tried with:
s = mapscript.classObj(layer)
<other style and label stuff>
s.updateFromString('TEXT (tostring(([SQKM]),"%.0f")+" km2")')

But I get:
EOFError: loadClass(): Premature End-of-File.

So obviously not correct.

Is there someone who could suggest what could be wrong here or what else to look at and try?

Trygve Aspenes
_______________________________________________
MapServer-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to