[mapserver-users] Repeating annotation, using LABEL_NO_CLIP=1 with Open Layers
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Wed Jan 27 09:36:15 PST 2010
Do you have to have them in the image or is it enough to have them displayed some other way? Work arounds include:
- Use untiled with 'ratio:1', creates images the same size as your view port.
- Just drop the copyright in a div over the top of the viewport and don't have it in the image.
- Could even create a copyright only layer in OL but if that's the only use then I'd just use the browser to do it.
Steve
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bob Basques
Sent: Tuesday, January 26, 2010 7:20 PM
To: Ted Spradley; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Repeating annotation, using LABEL_NO_CLIP=1 with Open Layers
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
>
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list