[mapserver-users] Query Error

Shaik Anwar Hussain shussain at atsincorp.com
Tue Feb 12 12:39:52 PST 2002


Hi Friends,
              I am trying to display the map by query selection. I am
gettting the following error. Does any one can help me  to fix this error.
         msQueryByAttributes(): General error message. No query layer
defined. 
        
               I am using mapserver 3.5, windows 2000, apache.

Thanks,
Anwar
www.atsincorp.com

          here is my map file.
#
# Start of map file - created Thu Jan 24 11:36:43 2002
#
NAME PAMS
SIZE 585 295
EXTENT -252600 -148033.591 274400 165545.107
UNITS meters
SHAPEPATH 'e:\pams\pamsdata/'
SYMBOLSET  "C:\Program Files\Apache Group\Apache\htdocs\Symbols\symbols.sym"

#
# Start of web interface definition
#
WEB
  TEMPLATE 'mapdisplay.html'
  IMAGEPATH 'C:\Program Files\Apache Group\Apache\htdocs\mapimages\'
  IMAGEURL '/mapimages/'
  LOG 'accessLog.txt'
END  #WEB
#
# Start of reference map
#

QUERYMAP
  STATUS ON
  STYLE SELECTED
END # QUERYMAP

REFERENCE
  SIZE 136 110
  #IMAGE 'C:\Program Files\Apache Group\Apache\htdocs\pams1\ref_map.jpg'
  IMAGE 'C:\Program Files\Apache Group\Apache\htdocs\pams1\refmap1.jpg'
  EXTENT -255899 -190124 279677 210767
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END  #REFERENCE
#
# Start of legend
#
LEGEND
  IMAGECOLOR 205 205 205
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
    POSITION UR
  END
  STATUS ON
END   #LEGEND
#
# Start of scalebar
#
SCALEBAR
  STATUS EMBED
  STYLE 0
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 0 0 0
    SIZE TINY
  END  #LABEL
  SIZE 150 4
  COLOR 245 245 245
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS MILES
  POSITION LR
  INTERVALS 5
END   #SCALEBAR
#
# Start of layer definitions
#
LAYER
  NAME "municipalities"
  TYPE Polygon
  STATUS default
  DATA 'mcd'
  HEADER 'municipalities_header.html'
   
    TEMPLATE "municipalities_query.html"
   
  CLASS
    Name 'Municipalities'
    COLOR -1 -1 -1
    OUTLINECOLOR 206 213 224
  END  # CLASS
END  # LAYER


LAYER
  NAME "district"
PROJECTION
  "proj=poly"
  "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"
 END

  TYPE Polygon
  STATUS default
  DATA 'district'
  HEADER 'district_header.html'
   
    TEMPLATE "district_query.html"
   
  CLASS
    Name 'District'
    COLOR -1 -1 -1
    SYMBOL 'circle'
   SIZE 3

    OUTLINECOLOR 0 0 255
     
  END  # CLASS
END  # LAYER


LAYER
  NAME "county"
PROJECTION
  "proj=poly"
  "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"
 END

  TYPE Polygon
  STATUS default
  DATA 'county'
  LABELMINSCALE 70000
  LABELITEM 'County__'
  HEADER 'county_header.html'

    TEMPLATE "county_query.html"

  CLASS
    LABEL
      COLOR 0 0 0
      ANTIALIAS True
    END # LABEL
    Name 'County'
    COLOR -1 -1 -1
    OUTLINECOLOR 0 0 255
    
  END  # CLASS
END  # LAYER

LAYER
  NAME "stateroutes"
  STATUS default
 PROJECTION
  "proj=poly"
  "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"
 END

  TYPE line
  MAXSCALE 850000
  #MINSCALE 1000
  DATA 'stateroutes'
  HEADER 'stateroutes_header.html'
   
    TEMPLATE "stateroutes_query.html"
   
  CLASS
    Name 'Stateroutes'
    COLOR 232 155 143
    OUTLINECOLOR 0 0 0
    #SYMBOL 'circle'
   #SIZE 3

  END  # CLASS
END  # LAYER


LAYER
  NAME "drgs"
  TYPE raster
  TILEINDEX "drgtile"
  TILEITEM "location"
  STATUS on
  MAXSCALE 150000
END # LAYER

LAYER
  NAME "quads"
 PROJECTION
  "proj=poly"
  "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"
 END
  TYPE Polygon
  STATUS on
  MINSCALE 150000
  DATA 'quadsheets'
  HEADER 'quads_header.html'
   
    TEMPLATE "quads_query.html"
   
  CLASS
    Name 'Quads'
    COLOR -1 -1 -1
    OUTLINECOLOR 0 0 0
  END  # CLASS
END  # LAYER



LAYER
  NAME "flightline"
 PROJECTION
   "proj=poly"
   "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"

 END
  TYPE polygon
  STATUS off
  DATA 'ascot_lin'
  HEADER 'ascot_lin_header.html'
   
    TEMPLATE "ascot_lin_query.html"
   
  CLASS
    Name 'Flight Lines'
    #COLOR 255 0 0
    OUTLINECOLOR 255 0 0
    SYMBOL 'circle'
    SIZE 2

  END  # CLASS
END  # LAYER

LAYER
  NAME "block"
PROJECTION
  "proj=poly"
  "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"
 END

  TYPE Polygon
  STATUS off
  DATA 'ascot_prj'
  HEADER 'ascot_prj_header.html'
   
    TEMPLATE "ascot_prj_query.html"
   
  CLASS
    Name 'Blocks'
    #COLOR 152 50 32
    OUTLINECOLOR 255 0 0
    SYMBOL 'circle'
    SIZE 4
  END  # CLASS
END  # LAYER

LAYER
  NAME "photo"
 PROJECTION
   "proj=poly"
   "ellps=GRS80"
  "lon_0=77.75w"
  "lat_0=40.925n"

 END
  TYPE Point
  STATUS off
  DATA 'ascot_pho'
  HEADER 'ascot_pho_header.html'
   
    TEMPLATE "ascot_pho_query.html"
   
  CLASS
    Name 'Photos'
    COLOR 255 0 0
    OUTLINECOLOR 255 0 0
    SYMBOL 'circle' 
    SIZE 6

  END  # CLASS
END  # LAYER


END  # MAPFILE






More information about the MapServer-users mailing list