MapTools.org

[maplab-users] Need a adult's assistance

Andrew Bailey andy@planetnomad.com
Mon, 24 Mar 2003 13:09:05 -0000
Could someone please give me a basic run through of adding a vector layer to
a map file? Setting it up so all objects in the layer appear, and the query
tool returns all attribute information associated with an object...

My current dataset is a polygon layer called 'global countries region' with
a attribute called 'cntry_name' that i would like to use as a label, other
attribute information is also present that i would like to appear in the
query tool results.

I know this is covered in the maplab tutorial but i've found it confusing. I
would like the relationship between a layer and a class object, and a
layer's classitem to be clarified. Where names of objects must match
attribute names for example.

Additionally to my simple brain aches, i can't get the query tool to work.
When using it with the tutorial.map i always get the following;
The following layers did not return any results:
bathymetry, land_fn, drain_fn, drainage, prov_bound, fedlimit, popplace

When i try querying my countries layer i get a fatal php error but i suspect
it has more to do with my map setup. (winXP, IIS5, php4.2.3, mapserver3.6.3)
Error details: "szAppName : php.exe szAppVer : 0.0.0.0 szModName :
php_mapscript_36.dll
szModVer : 0.0.0.0 offset : 001f96b4"

Regards,
Andrew Bailey

PS: I've contained the majority of my map file below if that's any help;
  NAME "PLANETNOMAD"
  STATUS ON
  EXTENT -180 -90 180 90
  SIZE 800 400
  SHAPEPATH "./data"
  SYMBOLSET "./etc/symbols.sym"
  FONTSET "./etc/fonts.txt"
  IMAGECOLOR 255 255 255
  UNITS DD
  IMAGETYPE PNG
  #
  # Start of web interface definition
  #
  WEB
    MINSCALE 2000000
    MAXSCALE 5000000000
    #
    # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the
root
    # of the drive where the .MAP file resides.
    #
    IMAGEPATH "C:/msapps/tmp_img_path/"
    IMAGEURL "/ms_tmp/"
  #  LOG "/tmp/gmap.log"
  END
  #
  # Start of reference object (keymap)
  #
  REFERENCE
    STATUS ON
    IMAGE "images/keymap.gif"
    SIZE 200 100
    EXTENT -180 -90 180 90
    COLOR -1 -1 -1
    OUTLINECOLOR 255 0 0
  END
  #
  # Start of querymap object
  #
  QUERYMAP
    COLOR 255 0 0
    STYLE HILITE
  END
  #
  # Start of legend object
  #
  LEGEND
    STATUS ON
    KEYSIZE 18 12
    TEMPLATE "ttt"
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      COLOR 0 0 89
    END
  END
  #
  # Start of scalebar object
  #
  SCALEBAR
    STATUS ON
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    BACKGROUNDCOLOR 0 0 0
    IMAGECOLOR 255 255 255
    UNITS KILOMETERS
    INTERVALS 5
    SIZE 400 5
    LABEL
      SIZE SMALL
      COLOR 0 0 0
    END
  END
  LAYER
    NAME "global countries region"
    GROUP "countries"
    STATUS ON
    DATA "global/pan-global/Global_Countries_region"
    TYPE POLYGON
    CLASSITEM "CNTRY_NAME"
    UNITS DD
    SIZEUNITS DD
    TEMPLATE "ttt.html"
    METADATA
      "name"    "cntry_name"
    END
    CLASS
      NAME "cntry_name"
      COLOR 153 255 176
      OUTLINECOLOR 49 177 109
      LABEL
        TYPE TRUETYPE
        FONT "fritqat-italic"
        SIZE 8
        POSITION AUTO
        COLOR 0 0 0
      END
    END
  END
# Layer



This archive was generated by Pipermail.