The size of a line is always 1 pixel even when I change the size from 1 to 2 or more

Gerard Troost gerard.troost at SOVON.NL
Fri Mar 16 13:58:45 PDT 2007


use the width element... (Line's dont have a size but a width)

   CLASS
      STYLE
        OUTLINECOLOR 255 0 0
        WIDTH 2
      END
   END

Regards,
Gerard Troost

 

----------------------------------------------------------------------------
----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] 
On Behalf Of Rodrigo Martín LÓPEZ GREGORIO
Sent: vrijdag 16 maart 2007 19:40
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] The size of a line is always 1 pixel 
even when I change the size from 1 to 2 or more


Hi John.

The SIZE option of CLASS element doesn't work as "line width". This is how I 
solved this:

First I create a Symbol in my symbol file like:

SYMBOL
  NAME "cartoline" 
  TYPE cartoline
  LINECAP round #[butt|round|square|triangle]
  LINEJOIN round #[round|miter|bevel]
  #LINEJOINMAXSIZE 3
END


Then, in the layer I want to set line width I do:

  LAYER
    NAME "mylinelayer"
    ......................................
    SIZEUNITS PIXELS
    CLASS
      NAME "mylinelayer"
      STYLE
        ANTIALIAS TRUE
        COLOR 255 0 0 
        SIZE 2
        SYMBOL "cartoline"
      END
    END
  END  


Now, the SIZE property in CLASS element work as you want.

Maybe you want to take a look at:

http://mapserver.gis.umn.edu/docs/howto/cartosymbols/

there are more examples and all the cartoline options full explained.

I hope it helps you.

Rodrigo.


On 3/16/07, John Mitchell <mitchelljj98 at gmail.com> wrote: 
Hi,

The size of a line is always 1 pixel even when I change the size from 1 to 2 or 
more: 

LAYER
  NAME MajorRoads
  TYPE Line
  DATA "F:\GV_Data\ShapeFiles\usa\majrdnet"

  STATUS ON 

  CLASS
   COLOR 0 0 0
   SIZE 2
  END

 END


-- 
John J. Mitchell 



More information about the MapServer-users mailing list