Dynamic Maptitle

Gerjan Walrecht WalrechtG at VERTIS.NL
Tue Jul 26 08:05:32 EDT 2005


Hi Stefanie and List,

I modified my layer configuration according to the hints of Sefanie (tnx fot
that!).
It seems a better way to configure the layer, but the maptile itself is
still static. I would like to use a parameter in the Text like for instance:

...
TEXT "Rainfall in the year %parameter_year%" 
...

Has anyone a suggestion?


This is my layer configuration now:
 LAYER
   NAME "Titel"
   STATUS DEFAULT #title should always be on
   TRANSFORM FALSE
   TYPE ANNOTATION
   CLASS
     LABEL
       TYPE      bitmap
#      FONT      verdana-italic #Truetype fonts do not work yet on my
machine
#      SIZE      12
       POSITION  CC
       COLOR     0 0 0
     END
   END
   FEATURE
     POINTS 240 10
     END
     TEXT "%year% Dynamic Title here"
   END
 END


Gerjan

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Stefanie Weykam
Sent: 26 juli 2005 9:19
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Dynamic Maptitle


Gerjan,
this is how I did it: 

 LAYER #-------subtitulo para especies---
   NAME       "subtitESP"
   STATUS     OFF
   TYPE       ANNOTATION
   TRANSFORM  FALSE 
   CLASS
      LABEL
         TYPE      TRUETYPE 
         FONT      verdana-italic     
         SIZE      12
         POSITION  LL
         COLOR     160 90 0 
      END
   END
   FEATURE
      TEXT    "Merops apiaster" # "Abejaruco común"
      POINTS
            635 10
      END
   END
 END

Remember this:
TYPE is ANNOTATION
Feature points refere to the image coordinates (not map coordinates!)
Set the LABEL parameters to define colour and size of the text.
I used POSITION LowerLeft since my titles are anchored close to the right
border of the map and then extent to the left according to text length (you
may wish to change that for your application).
Do not use STATUS DEFAULT in case you want to toggle the title on and off.

Hope this helps,
Stefanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050726/2414cf93/attachment.html


More information about the mapserver-users mailing list