Annotation and positioning referenced from the edges (like Scale POSITION

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue Feb 20 14:37:18 PST 2007


Annotation implies drawing text of some sort. Without that I bet the
code is bailing since there
isn't a label object defined nor a labelitem or text element. Off the
top of my head there are a 
couple of work arounds to try:

  - draw the layer as a point layer
  - draw an empty string (e.g. a space) along with the png image

Steve

>>> Bob Basques <bob.basques at CI.STPAUL.MN.US> 2/20/2007 4:10:37 PM >>>
Ran into a problem with this Annotation stuff.  Trying to apply a PNG 
symbol as annotation.   Can't seem to get anything to display.  I'm
past 
the error though, and my text layer displays just fine.  The last layer

is the problem one.

Thanks.

bobb



Symbol definition:

SYMBOL
    NAME 'moose_logo_90x42'
    TYPE PIXMAP
    IMAGE 'moose_logo_90x42.png'
    TRANSPARENT 8   ## QUESTION, what does this do anyway ???? It broke

without it in there
END

Mapfile:

MAP
    NAME 'point'
    UNITS FEET

    TRANSPARENT TRUE
    IMAGETYPE PNG

    SYMBOLSET point.symbols
    FONTSET font.list
   
    LAYER
        NAME 'copyright'
        TYPE ANNOTATION
        TRANSFORM LL
        STATUS DEFAULT
        FEATURE
            POINTS 200 -10 END
            TEXT 'City of Saint Paul, Public Works, Technical Services
- 
This is NOT a legal document'
        END
        CLASS
            LABEL
                TYPE truetype
                FONT bluehigh
                COLOR 0 0 0
                OUTLINECOLOR 254 254 254
                SHADOWSIZE 1 1
                SIZE 11
            END
        END
    END
    *LAYER
        NAME 'moose'
        TYPE ANNOTATION
        TRANSFORM CC
        STATUS DEFAULT
        FEATURE
            POINTS 0 0 END
        END
        CLASS
            STYLE
                SYMBOL "moose_logo_90x42"
                COLOR 0 0 0
                OUTLINECOLOR 0 0 0
            END
        END
    END*
 
END



Bob Basques wrote:
> This is a multi-part message in MIME format.
> --------------050300050700000903050405
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
>
> All,
>
> I guess I need to look harder next time, looks like it's in the
newest version already . . . .  Silly me.
>
> This works now. (COOL!)
>
> MAP
>      NAME 'point'
>      UNITS FEET
>
>      TRANSPARENT TRUE
>      IMAGETYPE PNG
>
>      SYMBOLSET point.symbols
>
>      LAYER
>          NAME 'copyright'
>          TYPE ANNOTATION
>          TRANSFORM LL
>          STATUS DEFAULT
>          FEATURE
>              POINTS 40 -10 END
>              TEXT 'Technical Services'
>          END
>          CLASS
>              LABEL
>                  TYPE BITMAP
>                  COLOR 254 254 254
>                  OUTLINECOLOR 0 0 0
>                  SHADOWCOLOR 0 0 0
>                  SHADOWSIZE 1 1
>                  SIZE TINY
>              END
>          END
>      END
> END
>
> bobb
>   

-- 

****************  You can't be late until you show up. 
***************
************  You never learn anything by doing it right. 
************
***  War doesn't determine who's right. War determines who's left. 
***



More information about the MapServer-users mailing list