[mapserver-users] Repeating annotation, using LABEL_NO_CLIP=1 with Open Layers

Bob Basques bob.b at gritechnologies.com
Tue Jan 26 20:19:37 EST 2010


It probably still there, only out of frame if you are using OpenLayers, 
which I believe grabs a tile larger than the current view for panning by 
the user.

Other than adding another layer or restricting the tiles retrieved to 
the same size as the current view port, I don't know of a way of getting 
a copyright into view.  There may be some OpenLayers settings that aloow 
for a center tile that is as large as the current view with tiles 
arouand the edges, but this may be a performance hit.

bobb



On 1/26/2010 5:51 PM, Ted Spradley wrote:
> Hi everyone,
>
> I recently added a copyright notice via an annotation layer.  When the
> mapfile is accessed as a WMS
> via OpenLayers, the annotation repeats on every tile.  I am using the
> directive:
>       PROCESSING 'LABEL_NO_CLIP=1'
>
> Setting the OL WMS call to Untiled did cause the annotation to disappear
> altogether.  Any thoughts?
>
> Thank you!
> Ted S.
>
> /* The layer */
>
>    LAYER
>      NAME "copyright"
>      STATUS ON
>      TYPE annotation
>      PROCESSING 'LABEL_NO_CLIP=1'
>      TRANSFORM ll #set the image origin to be lower left
>      FEATURE
>        POINTS
>          100 -20 #set the offset from lower left position in pixels
>        END
>        TEXT "copyright text" #this is your displaying text
>      END
>      CLASS
>        LABEL #defines the font, colors etc. of the text
>          FONT "ARIAL"
>          TYPE TRUETYPE
>          SIZE 8
>          BUFFER 1
>          COLOR 0 0 0
>          BACKGROUNDCOLOR 255 255 255
>        END
>      END
>      UNITS PIXELS #sets the units for the feature object
>    END
>
>
>
> -----
> Thank you,
> Ted S
>
> MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
> INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
>
> Linux/Fedora7
>    



More information about the mapserver-users mailing list