scalebar

Wendy Arbuckle wendy_arbuckle at YAHOO.COM
Fri Jun 24 11:44:19 PDT 2005


i am a super newbie (as you will see from my code)

i'm not sure if i can even get my scalebar to show up without using some
form of html code

i am using a wms server

this is some of my code before the layer definitions:

#
# Start of map file
#

MAP
 # NAME PRDC-demo

 # background color of image if transparency
 # is not requested
 IMAGECOLOR 174 206 180

 # default output image dimensions
 SIZE 600 400

 # always returns a map
 STATUS ON

 # set top level projection
 PROJECTION
  "init=epsg:2961"
 END

 #start of the scalebar
 SCALEBAR
  STATUS EMBED
  LABEL
    SIZE tiny
    COLOR 0 0 0
    OUTLINECOLOR 255 255 255
  END
  STYLE 0
  INTERVALS 3
  SIZE 100 3
  COLOR 0 0 0
  BACKGROUNDCOLOR 255 255 255
  OUTLINECOLOR 0 0 0
  UNITS MILES
  POSITION LR
  TRANSPARENT TRUE
  #POSTLABELCACHE true
END # Scalebar




 # image format options
 OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGB
  EXTENSION "png"
 END


 # minx miny maxx maxy
 # sets:
 # /WMT_MS_Capabilities/Capability/Layer/LatLonBoundingBox(@minx @miny
@maxx @maxx)
 # EXTENT -180 -90 180 90 # World
 EXTENT 486716 5.01368e+006 572241 5.07531e+006

 # add def pointers for symbols

 SYMBOLSET "../etc/symbols/symbols.sym"

  FONTSET   "../etc/fonts/fonts.txt"

SCALEBAR
  IMAGECOLOR 255 255 255
# background color of the image placeholder
  LABEL
    COLOR 0 0 0
# color of the labels indicating the distance
    SIZE SMALL
# size of the labels
  END
  SIZE 350 5
# sixe in pixels of the scalebar
  COLOR 255 255 255
# color used in the scalebar
  BACKGROUNDCOLOR 0 0 0
# background color of the drawn scalebar
  OUTLINECOLOR 0 0 0
# outline color of the salebar
  UNITS kilometers
# units to be used
  INTERVALS 5
# How many intervals in total in the
# scalebar
  STATUS ON
# the scalebar is on by default
END

 #
 # Start of web interface definition
 WEB

  # this is the real filepath to the temp dir for intermediate file
creation
  IMAGEPATH "/tmp/ms_tmp/"

  # this is the web-accessible path to IMAGEPATH
  IMAGEURL "/ms_tmp/"

  HEADER "../templates/query_header.html"
  FOOTER "../templates/query_footer.html"

  METADATA

   "map" "/var/www/html/mapserver/service/prdc-demo.map"

   "ows_schemas_location" "http://schemas.opengeospatial.net"

   "ows_title" "Pictou County GIS demo"

   "ows_abstract" "Pictou County GIS demo.  Enjoy!"

   "ows_keywordlist" "mapserver,ogc,workshop"

   "ows_service_onlineresource" "http://localhost/mapserver/index.html"
   "ows_fees" "none"
   "ows_accessconstraints" "none"
   "wms_contactperson" "Libo Feng"
   "wms_contactorganization" "Pictou County"
   "wms_contactposition" "Systems Scientist"
   "wms_addresstype" "postal"
   "wms_address"     "980 East River rd."
   "wms_city" "New Glasgow"
   "wms_stateorprovince" "Nova Scotia"
   "wms_postcode" "B2H-2G3"
   "wms_country" "Canada"
   "wms_contactvoicetelephone" "+01-905-336-4409"
   "wms_contactfacsimiletelephone" "+01-905-336-4499"
  "wms_contactelectronicmailaddress" "lfeng at prdc.com"
   "wms_srs" "EPSG:4326"
   "wms_feature_info_mime_type"  "text/html"
   "wfs_srs" "EPSG:4326"
   "wfs_namespace_uri" "http://localhost/mapserver"
   "wfs_namespace_prefix" "ms_ogc"
   "wcs_label" "Sample OWS for MapServer OGC Web Services Workshop"
   "wcs_description" "Sample OWS for MapServer OGC Web Services Workshop.
Enjoy!"
  "WMS_SLD_SYMBOL_URL" "http://wendy/dot.png"



   # sets:
   # /WCS_Capabilities/Service/metadataLink/@xlink:href
   "wcs_metadatalink_href" "http://devgeo.cciw.ca/index.html"
   END
 END

 # hilite map for GetFeatureInfo "info_format=text/html"
 # requests

 QUERYMAP
  STATUS ON
  SIZE 200 200
  STYLE HILITE
  COLOR 255 255 0
 END


 # set defaults for GetLegendGraphic requests
 LEGEND
  LABEL
   TYPE BITMAP
   SIZE MEDIUM
   COLOR 222 0 0
   POSITION cc
  END
 END

and this is the address i am using for my mapserver:

"http://192.168.3.102/cgi-bin/mapserv?
map=/var/www/html/mapserver/service/prdc-
demo.map&version=1.1.1&service=WMS&request=GetMap&srs=EPSG:2961&mode=scaleb
ar&width=600&height=400&layers=cobounds,roads&SLD=http://192.168.3.102/maps
erver/service/sld_line_width.xml"



i am probably missing something simple

any direction would be appreciated

thnx



More information about the MapServer-users mailing list