dynamically supress/enable lables at zoom in/out
Steven Monai
stevem at SPATIALMAPPING.COM
Tue Feb 15 08:42:31 PST 2005
Besides using the MIN and MAX SCALE parameters, you can get quite nice
results by using the BUFFER parameter in your LABEL block, say "BUFFER 5",
to specify a buffer zone of 5 pixels around each label when MapServer looks
for label overlaps. Other parameters I've found useful or essential in the
LABEL block are:
FORCE FALSE : to prevent labels from overlapping;
PARTIALS FALSE : to prevent labels from running off the edge of the map (I
hate it when labels get cut off);
MINFEATURESIZE AUTO : to prevent labelling features that are smaller than
their labels (usually a good idea, but not always);
MINDISTANCE 20 : to prevent duplicate labels from appearing closer than 20
pixels apart (or whatever distance you decide); think of this one as
another kind of BUFFER.
Finally, make sure you have "LABELCACHE ON" in your LAYER block, to allow
MapServer to work its magic most effectively.
Regards,
-SM
--
On Mon, 14 Feb 2005 22:54:04 -0500, Stephen Woodbridge
<woodbri at SWOODBRIDGE.COM> wrote:
>This id completely under the control of the mapfile. You can set
>MINSCALE/MAXSCALE to turn layers on/off and you can set
>LABELMINSCALE/LABELMAXSCALE to control when labels are turned on/off
>
>These are all documented in the Mapfile Reference manual incase you need
>more details.
>
>-Steve W.
>
>Shashi Gireddy wrote:
>> Hi all,
>> I want to supress the labels where the area is not enough to display
>> but i want to display them after it is zoomed ... is it possible. (or)
>> I want to transfer to entirely different program which displays a
>> different map(just like HTML map). Sobody did it( I am not sure if it
>> is mapscript, may be ArcIMS) for indian maps.
>>
>> anybody has any idea.
>> thanks in advance.
>> shashi
>>
More information about the MapServer-users
mailing list