Dashed Outline
David Fawcett
David.Fawcett at STATE.MN.US
Wed Sep 8 07:39:48 PDT 2004
As promised, I added a working example to the Wiki
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?SymbolExamples
Scroll down to the 'Creative Solutions' section.
For documentation in the archives, here is a working example. Note
that the STYLE object was added in version 4.0, so this example won't
work with pre-4.0 versions of MapServer.
The effect is achieved by adding two styles to the class, one for the
colored fill and the other for the dashed outline.
LAYER
NAME county
TYPE polygon
STATUS default
DATA cntypy
CLASS
STYLE #this style defines polygon fill color
COLOR 225 225 185
END
STYLE #this style defines the outline of the polygon
OUTLINECOLOR 128 128 128
SYMBOL 'dashed'
END
END
END
This example requires that:
1. You have a symbol definition in your symbol.sym file that is
named 'dashed' and looks like this
SYMBOL
NAME 'dashed'
TYPE ELLIPSE
POINTS 1 1 END
FILLED true
STYLE 10 5 5 10 END
END
2. You have line in your MAP file stating the correct path to your
symbols file (e.g. SYMBOLSET symbols/symbol.sym)
David.
David J. Fawcett
MN Office of Environmental Assistance
>>> Monica Socol <monicasocol at CUESTASYS.COM> 9/7/2004 11:27:52 AM >>>
Yes,
It is possible. You have to define a new symbol into .symbols file for
a
dashed line.
Then you have to define 2 styles for that class:
- The first one will have the colour for the filling or the symbol for
the interior or the polygon.
- The second style defines the line (symbol, size, colour).
I found out that if I put everything in one style, the symbol and size
are applied to the interior, not to the line. But it works with 2
separate styles.
------------------------------------------------------------------------
----
Monica Socol
Systems Architect
Cuesta Systems Inc.
5230 South Service Rd., Burlington L7L 5K2
tel: 905.333.4544 ext 30
fax: 905.333.0455
e-mail: monicasocol at cuestasys.com
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
On
Behalf Of Titus von der Malsburg
Sent: Tuesday, September 07, 2004 12:27 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Dashed Outline
I want the outline of a polygon (esri world base country layer) to be
dashed, but couldn't find anything about how to achieve this. No
documentation, no mapfile snippets. Is it possible at all to have
dashed outlines?
A hack, that seems to work is
* duplicate the layer in the mapfile
* say TYPE POLYGON to the one
* and TYPE LINE to the other
* the first defines the filling
* the latter the outline
Cheers,
Titus
More information about the MapServer-users
mailing list