Scale bar

Steve Lime steve.lime at DNR.STATE.MN.US
Fri Feb 17 18:12:33 EST 2006


I notice you haven't set the overall map UNITS. The default is METERS.
If that's not correct then that could lead to all sorts of discrepancies...

Steve

>>> Ramesh Karra <karrarm at YAHOO.COM> 02/17/06 4:19 PM >>>
Hi,

I would like to know how SCALEBAR object works. I would like to know if
the length of the scalebar drawn depends on the extent of the map.

When I use the following map file, the scale bar draws a line of about
2cms length and shows it as 1 inch! I feel this is not right because the
initial extent covers more than 10 inches of geographical area. What am I
missing here?

Thanks in advance
Ramesh

MAP
  IMAGETYPE      PNG
  EXTENT  10.3605 5.309 10.609 5.507
  SIZE           600 450
  SHAPEPATH      "/ms4w/"
  IMAGECOLOR     225 225 225
  FONTSET        "/ms4w/apps/ms101/fonts/fonts.list"
  SYMBOLSET      "c:\ms4w\symbols.sym"

  TEMPLATEPATTERN 'tm*'

  WEB
    TEMPLATE  'xxx'
    IMAGEPATH '/ms4w/tmp/ms_tmp/'
    IMAGEURL  '/ms_tmp/'
  END # Every object in MapServer must have an END.;)

  SCALEBAR
    IMAGECOLOR 255 255 255
    LABEL
      COLOR 200 0 0
      SIZE TINY
    END
    STYLE 1
    SIZE 100 2
    COLOR 0 0 0
    UNITS INCHES
    INTERVALS 2
    TRANSPARENT FALSE
    STATUS ON
  END # Scalebar object ends
END



More information about the mapserver-users mailing list