Assorted formatting queries
Nigel Gilbert
n.gilbert at SURREY.AC.UK
Sun Jul 2 08:55:28 PDT 2006
I¹m just finishing the first iteration of a Mapserver template and have a
number of small queries that I cannot find the answers to in the
documentation:
1. I am using [scale] to insert the current map scale (as ³1:[scale]²).
However, the value inserted by mapserver includes many decimal places and
would be better rounded to a reasonable number of significant figures before
it is displayed. Is there any easier way of doing this than writing a
rounding routine in Javascript?
2. I am using [scalebar] to insert a scalebar. However, when the end of the
scalebar should be showing a scale larger than about 10^6, the image
generated by mapserver collapses into a mess of overlapping characters, all
in an image only about 10 pixels across, although the scalebar at smaller
scales is 200 pixels wide. Is this a bug in mapserver, or should I be doing
something different? The HTML is:
<img title=²scalebar² alt=²scalebar² align=²right² src=²[scalebar]²> and the
map entry is:
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE SMALL
END
STYLE 1
SIZE 200 4
COLOR 0 0 0
UNITS METERS
INTERVALS 2
TRANSPARENT FALSE
STATUS ON
END
3. I am displaying a Grid (Graticule) on the map, following the example in
the Mapfile Reference document, which uses a separate Grid layer. However,
the Grid layer is included in the layers shown in the Legend, which I don¹t
want. How can I exclude the Grid layer from the Legend?
4. The Map being displayed is not a real world¹ map, but a map of a virtual
environment. This environment is square, of side 2^32 1 units. Mapserver
manages to display this effectively, I am pleased to say. However, this
virtual world has no units of distance (well, at least not meters or miles),
but the scalebar seems to insist on there being some distance unit (meters
by default). Is there a way of tell the scalebar generation routine not to
show a unit at all at the end of the scalebar?
Thanks for any hints about any of these queries!
Nigel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060702/e63d9d44/attachment.htm>
More information about the MapServer-users
mailing list