[mapserver-users] Python mapscript: inline point feature How To

Roger André randre at gmail.com
Tue Feb 24 17:44:36 EST 2009


Hi Everyone,

A little while ago, Brent Fraser sent me a mapfile snippet that could be
used to add a Title to a map using pixel coordinate space.  It looked like
this:

  LAYER
    NAME title
    STATUS DEFAULT
    TRANSFORM FALSE
    TYPE ANNOTATION

    FEATURE
      POINTS 4 396 END
      TEXT 'This is a Great Map!'
    END

    CLASS
      LABEL
        TYPE TRUETYPE
        FONT arial
        SIZE 8
        ANTIALIAS
        COLOR 255 255 255
        POSITION UR
      END
    END

  END

This works well, but I would like to override the TEXT value using mapscript
to create new labels that are based on the result of PostGIS queries.  I've
been picking apart various examples on the web, but can't seem to come up
with the magic sauce.  I can figure out how to grab the layer ByName, but
then I'm not quite sure what I need to do in order to access the feature and
override the TEXT.

Can someone give me a clue?

Thanks,

Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090224/4d8f4d8f/attachment.html


More information about the mapserver-users mailing list