[mapserver-users] attribute query error
Shaik Anwar Hussain
shussain at atsincorp.com
Wed Feb 13 11:11:10 PST 2002
Hi Friends,
Thanks for your help,
Here is the link i am passing to display the attribute queries.
http://208.163.164.119:6500/cgi-bin/mapserv?map=../htdocs/pams1/pams.map&lay
ers=flightline&mode=itemnquery&zoomdir=0&imgxy=585 295&imgext=300434 -148033
322234 1655445&zoomsize=2&mapext=-252600 -148033 274400
165545&qlayer=flightline&map_flightline_header=mapdisplay.html&map_flightlin
e_template=zoomto.html&item=Pams_code&value=^204A$&item=Pams_code&value=^218
A$
Pams_code is the attribute in flightline shape file.
msQueryByAttributes(): General error message. No query layer defined.
I am using mapserver 3.5, windows 2000, apache.
Can you tell me whats wrong in that link.
Is there any examples in mapserver site for attribute queries?.
where i can found these documentation.
Thanks,
Anwar
-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: Wednesday, February 13, 2002 12:18 AM
To: shussain at atsincorp.com
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] Query Error
It's not a mapfile problem, rather a problem with the CGI query. With
attribute queries you set the qlayer variable so the server knows which
layer to process.
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Shaik Anwar Hussain <shussain at atsincorp.com> 02/12/02 14:45 PM >>>
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 'flightline_header.html'
TEMPLATE "flightline_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 'block_header.html'
TEMPLATE "block_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 'photo_header.html'
TEMPLATE "photo_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