Hi Lars, The fill of the square was set to true, but I guess that is what happens when you only set the OUTLINECOLOR and a SYMBOL on a polygon type style.
In any case setting the type of the polygon layer to LINE did the trick. I was not aware this was possible, but it does make sense. Thanks for the quick answer! Kind regards, Anton > On 11 Oct 2017, at 18:50, lars.schylb...@blixtmail.se wrote: > > Hi, > > I guess that your symbol definition of square says filled false, it should > be be filled true. Do another symbol. > Next thing is that if You would like to do fancy borders symbols along a > polygon you could set LAYER - TYPE to line. > The syntax becomes easier. Last thing is to get the symbols to rotate with > the line you should set gap to a negative value. > > I made a small example to show this. Save this to line-with-squares.map and > run it with: > shp2img -m line-square-test.map -o line-square-test.png > > /Lars S. > _________________ > > MAP > SIZE 1000 1000 > IMAGETYPE png24 > EXTENT -30 -10 60 30 > UNITS DD > > SYMBOL > NAME "square_filled" > TYPE VECTOR > POINTS > 0 0 > 0 1 > 1 1 > 1 0 > 0 0 > END > FILLED TRUE > END > > LAYER # Simple polygon > STATUS DEFAULT > TYPE LINE > FEATURE > POINTS > 5 25 > 25 20 > 45 20 > 35 15 > 50 0 > 0 5 > 5 25 > END # Points > END # Feature > > CLASS > NAME "Symboltest" > STYLE > SYMBOL "square_filled" > COLOR 255 0 0 > SIZE 12 > INITIALGAP 15 > GAP -30 > OUTLINECOLOR 0 0 0 > WIDTH 2.0 > END #STYLE > END # CLASS > END # LAYER > END # MAP > > --------------------------- > > -----Originalmeddelande----- > Från: "Anton Bakker" <anton.bak...@geocat.net > <mailto:anton.bak...@geocat.net>> > Till: mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> > Datum: 2017-10-11 17:45 > Ämne: [mapserver-users] Polygon border with marker line symbol > > Hi list, > > I am trying to create the following symbology in MapServer, a marker line > symbol on the border of a polygon, see the following ArcMap screenshot > (https://i.imgur.com/9qN16tx.png <https://i.imgur.com/9qN16tx.png>). > > I tried the two following options, but could not manage to recreate the above > symbology: > > 1. Renders with marker fill on polygon (https://i.imgur.com/sFFznbq.png > <https://i.imgur.com/sFFznbq.png>): > > CLASS > NAME "countries_europe" > STYLE > ANTIALIAS TRUE > COLOR 204 204 204 > END > STYLE > ANTIALIAS TRUE > GAP 30 > OUTLINECOLOR 0 0 0 > COLOR 255 0 0 > SIZE 6 > SYMBOL 'square' > WIDTH 1.0 > END > END > > 2. Renders with marker line symbol on polygon border > (https://i.imgur.com/Qwrw8wP.png <https://i.imgur.com/Qwrw8wP.png>), but the > marker is missing the fill: > > CLASS > NAME "countries_europe" > STYLE > ANTIALIAS TRUE > COLOR 204 204 204 > END > STYLE > ANTIALIAS TRUE > GAP 30 > OUTLINECOLOR 0 0 0 > SIZE 6 > SYMBOL 'square' > WIDTH 1.0 > END > END > > Does anyone know whether it is possible to achieve this symbology? It seems > the only way to set a picture line symbol on the border of a polygon is to > only set the outlinecolor, but then there is no way to set the fill color for > the marker. I could not find any any information about this in the > documentation or the mailing list. > > Thanks and kind regards, > Anton Bakker > > software developer@geocat <http://www.geocat.net/> > tel. +31 318 416 664 > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> > https://lists.osgeo.org/mailman/listinfo/mapserver-users > <https://lists.osgeo.org/mailman/listinfo/mapserver-users> > > > -- > >
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users