Brent Fraser wrote:
The short story:
----------------
Is it possible to bind a CLASS's SYMBOL object to an attribute (i.e store the symbol name as a attribute of a feature)? And the LABEL objects FONT name?

Binding would be with style'symbol, instead of class symbol. Font also can be bound. I will update the docs to reflect that. The list of binding elements is:

For style:
 SIZE, WIDTH, ANGLE, COLOR, OUTLINECOLOR, SYMBOL, OUTLINEWIDTH, OPACITY

for labels: SIZE, ANGLE, COLOR, OUTLINECOLOR, FONT, PRIORITY

regards,

The Long Story:
---------------
I've been working with the yet-to-be-released Feature Editor in Geomoose v2. It allows the user to digitize features (points, lines, and polygons) and assign attributes, then stores them in PostGIS.

I want to allow simple styling and don't want to have a map file the size of "War and Peace", so I thought I would use the attribute/item/column binding abilities of Mapserver's CLASS and LABEL objects.

To that end, one of the columns the feature table will be "style name" (or maybe "feature class"), which I'll use to join to a style table (with COLOR, WIDTH, etc columns) to get the feature rendered in a simple style.

After a quick review of Mapserver's doc, most of the most important objects can be bound to attributes, with two exceptions, SYMBOL 'name' and FONT 'name':

CLASS
  STYLE
    ANGLE [angle]
    COLOR [color]  #R G B
    OUTLINECOLOR [olcolor] #R G B
    SIZE [size]
    WIDTH [width]  # v5.2

    SYMBOL 'name' # in SYMBOLSET

  END #STYLE

  TEXT ([label])
  LABEL
    ANGLE  [label_angle]
    COLOR [label_color]
    OUTLINECOLOR [label_olcolor]
    PRIORITY [label_priority]
    SIZE [label_size]

    FONT 'name' # in FONTSET
END #LABEL
END # CLASS

How difficult would it be to have attribute binding for SYMBOL and FONT? I suppose I could use mapscript, but I'd rather not.

Thanks!
Brent Fraser

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
----------------------------------------------------------------
Assefa Yewondwossen Software Analyst Email: ass...@dmsolutions.ca http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to