[Mapserver-users] Using STYLE objects (was: problem adding north arrow to map)

Steve Lime steve.lime at dnr.state.mn.us
Wed Jun 23 13:58:07 EDT 2004


With 4.0 it became clear that using COLOR and OVERLAYCOLOR and so on was
not going to work long term. Too darn many keywords to maintain, plus
there's only so much you can do with 2 symbols overlayed on top of each
other. STYLE objects simplfy the keyword syntax (or they will
eventually) and make it much easier to extend MapServer symbolization to
approach, for example, SLD. You can also create very complex symbols by
stacking STYLES and we can probably do away with the QUERYMAP object by
adding TYPE to a STYLE so that certain symbolizations would only be used
when presenting a query. Speculation on my part though.

You should consider moving to STYLES. There is a great degree of
backwards compatability built in, but as happend today we saw that's not
perfect. Named styles are not yet supported, although I'd like to, along
with named labels. In both cases you'd refer to a style/label defined at
the MAP level and could even exend them as necessary. For example,

STYLE
  NAME 'default_road'
  COLOR 255 0 0
  SYMBOL 'circle'
  SIZE 10
END

LAYER
  ...
  CLASS
    STYLE
      NAME 'default_road'
      COLOR 0 255 0 # change just the color
    END
  END
END

This is not yet available though.

Does this help? I'd be glad to clarify more...

Steve

>
>> Tyler Mitchell <tjmitchell at riverside.bc.ca> 6/23/2004 11:58:57 AM
>>>
> The SYMBOL really should be inside the STYLE object, that would make
it
> less of a kludge. The old keywords at the class level really affect
one
> of two styles behind the scenes. One main one and one for overlay.
Folks
> should move away from those shortcuts.

Call me Mr. Kludge - I could really use a short lesson on using STYLE 
instead of the typical shortcut :)
Should I just be moving all my style and symbol-related parameters into
a 
STYLE object in the CLASS?  Does 4.2 support named styles? 

Once I'm up to speed then I'll look at updating the docs Jeff and I 
created for the vector data access workshop. 
I suggest others do the same, every tutorial/training guide I reviewed
on 
the Mapserver site still uses the old method!


Tyler

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list