[Mapserver-users] Upward compatibility problem pixmap symbol

Claude Philipona claude-mapserver at skirando.ch
Wed Sep 24 06:12:11 PDT 2003


Hello,

I think there an upward compatibility problem concerning SYMBOL use in
Mapserver 4.0. Mapserver 4.0 introduces STYLE object which extends the way
to use symbol. Old mapfile (Mapserver 3.6), still work with Mapserver 4.0,
even if STYLE is not used. I think there is one exception, when the symbol
is of PIXMAP type, the symbol is never represented on the the map, except
if SYMBOL and SIZE are declared inside a STYLE object. Labels are present in
any case.

This will never represent any symbol on the map in mapserver 4.0:
  CLASS
    EXPRESSION /bus/
    NAME "bus"
    SYMBOL "bus"
    SIZE 18
  END

This will represent symbols on the map in mapserver 4.0:
  CLASS
    EXPRESSION /bus/
    NAME "bus"
    STYLE
      SYMBOL "bus"
      SIZE 18
    END
  END

I don't now if this behaviour is normal, but telling the list about it...
it can take some time to figure out why the labels are not showing up.

... portion of mapfile:

LAYER
  NAME "transport"
  TYPE POINT
  STATUS ON
  DATA "general/transport"
  CLASSITEM "TYPE"  

  CLASS
    EXPRESSION /bus/
    NAME "bus"
    STYLE
      SYMBOL "bus"
      SIZE 18
    END
  END

...
END

... portion of symbolfile:
Symbol
Name 'bus'
Type PIXMAP
Image icon_bus.png
END


Claude Philipona



More information about the MapServer-users mailing list