[mapserver-users] Scalebar label

Andrew ahaigh at ic24.net
Tue Feb 5 07:57:26 EST 2002


I'm relatively new to Mapserver and I'm attempting to implement Mapserver as on OGC WMS. I have two problems, so any help would be greatly appreciated. I've attached my mapfile definition at the bottom of the e-mail.

    1. I have defined a scalebar, which I'd like to embed in the map. This works fine however, I want to place some text (a copyright notice) next to the scalebar (i.e. along the bottom of the map). To do this I think I need to include a label entry in my scalebar definition, but I can't work out how to set the text I want to display.

    2. I have a vector layer which contains 136 polygons (name: 'boarders'). I'd like to make these semi-transparent, so you can still see the raster data in the layer below. Can you do this with Mapserver?

I'm using Mapserver 3.5 on Windows 2000.


Thanks in advance,

Andrew

Map file follows:

NAME EMS
STATUS ON
SIZE 500 350
EXTENT 380000 400000 450000 450000
UNITS METERS
IMAGETYPE gif

PROJECTION
 "init=epsg:27700"
END

WEB
 METADATA
  "wms_title"  "Enviroport Map Server"
  "wms_onlineresource" "http://plasma/cgi-bin/mapserv.exe?map=c:\demo.map"
  "wms_srs"  "epsg:27700"
 END
END

# Definitions for map symbols
SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 1 1 END
  FILLED TRUE
END
# End of map symbol definitions

# Start of Map Layers, The first layer in this list is displayed at the bottom, etc.
# Raster Data - Using shapefile index
LAYER
   NAME "rst50k"
   TYPE raster
   STATUS ON
   TRANSFORM true
   TILEINDEX "H:\data\50k\tiff\poly"

   PROJECTION
 "init=epsg:27700"
   END

   METADATA
    WMS_TITLE "1:50,000 Colour Raster"
    WMS_ABSTRACT "Add info here"
    WMS_SRS "EPSG:27700"
   END # End of Metadata tag
END # End of 50k raster



# Ward Data - shapefile
LAYER
   NAME "boarders"
   TYPE polygon
   DATA "H:\data\UKBoarders\947"
   STATUS OFF
   TRANSFORM true

   PROJECTION
 "init=epsg:27700"
   END

   CLASSITEM "Name"
   CLASS
    EXPRESSION 'Bolton'
    TEMPLATE "somepage.html"
    OUTLINECOLOR 0 0 0
    COLOR 0 255 0
   END # End of class Bolton
   CLASS
    EXPRESSION 'Birkby'
    TEMPLATE "somepage.html"
    OUTLINECOLOR 0 0 0
    COLOR 255 0 0
   END # End of class Bolton
   CLASS
    EXPRESSION /./
    TEMPLATE "somepage.html"
    OUTLINECOLOR 0 0 0
    COLOR 190 253 190
   END

  TOLERANCE 3



   METADATA
    WMS_TITLE "Wards"
    WMS_ABSTRACT "Ward boundary information."
    WMS_SRS "EPSG:27700"
   END # End of Metadata tag
END # End of layer

# Test POI Layer
LAYER
   NAME "poi"
   TYPE point
   DATA "H:\data\testInfo\poi"
   STATUS ON
   TRANSFORM true

   PROJECTION
 "init=epsg:27700"
   END
   
   CLASS
    SYMBOL 'circle'
    SIZE 2
    NAME 'Townships'
    OUTLINECOLOR 100 40 40
   END
 
   METADATA
    WMS_TITLE "Point of Interest Data"
    WMS_ABSTRACT "Test Point of Interest Data for Muckenbrough County Council"
    WMS_SRS "EPSG:27700"
   END # End of Metadata tag
END # End of layer

# Test for scalebar
MAP
 SCALEBAR
  BACKGROUNDCOLOR 0 0 0
  COLOR 255 255 255
  INTERVALS 3
  OUTLINECOLOR 255 0 0
  POSITION lr
  POSTLABELCACHE true
  SIZE 500 15
  STATUS embed
  TRANSPARENT off
  STYLE 0
  UNITS meters
  LABEL
     COLOR 0 0 0
     SIZE tiny
  END # END of label
 END # END of scalebar
END # End of map object

END # End of file

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020205/eb406cd5/attachment.html


More information about the mapserver-users mailing list