Oh, I see. Yeah, it's possible. Here's an example from one of my Python projects:

    circle = mapscript.symbolObj('circle')
    circle.type = mapscript.MS_SYMBOL_ELLIPSE
    circle.filled = mapscript.MS_TRUE
    line = mapscript.lineObj()
    line.add(mapscript.pointObj(1,1))
    circle.setPoints(line)
    circle.sizex = 1
    circle.sizey = 1
    mo.symbolset.appendSymbol(circle)

The "mo" name is bound to a mapObj. It's very important to get sizex and sizey right, should be the width and height of the symbol in the same units as the point and line coordinates used to construct the symbol.

To use this symbol

    style.symbol = mo.symbolset.index('circle')

Translate this into C# and you should be good to go.

cheers,
Sean

On Feb 15, 2006, at 5:03 PM, Christopher Condit wrote:

Hi Sean-
Is there a way to accomplish this with MapScript? All I see is a way to
set the symbolset.

Thanks,

Chris

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER- [EMAIL PROTECTED] On
Behalf Of Sean Gillies
Sent: Wednesday, February 15, 2006 3:58 PM
To: [email protected]
Subject: Re: [UMN_MAPSERVER-USERS] MapScript SetSymbolSet

On Feb 15, 2006, at 3:19 PM, Christopher Condit wrote:

Hi Julien-
Thanks for your response.  Here are the contents of the symbol file:
SYMBOLSET
  SYMBOL
    NAME 'circle'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED TRUE
  END
END

The problem I'm having is intermittent and I can't reliably reproduce
it.  My only thought was that for some reason mapscript couldn't read
the file.  Is there any way to embed these symbols directly in the
mapfile instead of referencing the symbolset file?

Thanks,

Chris

Yes, just add any SYMBOL block as a child of the top-level map.

Sean


---
Sean Gillies
sgillies at frii dot com
http://zcologia.com/news

Reply via email to