query

ender at titan.lab.csuchico.edu ender at titan.lab.csuchico.edu
Thu Oct 7 13:10:41 EDT 1999


To all:

I have been attemping to perform a query using mapserver for some time
now, and I have not been successful.  I have scoured over all of the
documentation, as well as the samples, and have not been able to determine
what I am missing.

I always get the error:
An error has occurred in msQueryUsingPoint(): Search returned no results. 

Could somebody tell me exactly what this error means?  Has mapserver found
any layers to query?  How do you find out?

Attached is my .map and template file

-Aaron

-------------- next part --------------
<html>
<head>
<title>Compendium of Water Quality Investigations</title>
</head>
<body bgcolor=#ffffff>
<table width=100%>
<tr>
<td width=100% colspan=3 bgcolor="#585a87" cellspacing=0 cellpadding=0>
<b>Municipal Water Quality Investigations Program</b><br>
1997 Compendium of Water Quality Investigations<br>
Sampling Sites of the Sacramento River Watershed<br>
<br>
<font size=+1><b>Central Area</b></font><br>
<br>
</td></tr>
<form method=GET action="/cgi-bin/mapserv">
<tr>
<td align=center valign=top width=110 bgcolor="#585a87">
<a href="http://titan.lab.csuchico.edu/compendium/pages/northern.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_northern_area.jpg" border=0 alt="Northern Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/northeast.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_northeast_area.jpg" border=0 alt="Northeastern Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/central.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_central_area.jpg" border=0 alt="Central Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/eastern.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_eastern_area.jpg" border=0 alt="Eastern Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/southern.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_southern_area.jpg" border=0 alt="Southern Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/delta.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_delta_area.jpg" border=0 alt="Delta Area"></a>
<a href="http://titan.lab.csuchico.edu/compendium/pages/sfbay.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/b_sfbay_area.jpg" border=0 alt="SF Bay Area"></a>
</td>
<td valign=top>
<b>Programs conducting sampling within this area:</b><br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/F4.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/F4.jpg" border=0></a> - U.S. Geological Survey<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/F7.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/F7.jpg" border=0></a> - U.S. Geological Survey<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/L1.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/L1.jpg" border=0></a> - California State University, Chico<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/L19.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/L19.jpg" border=0></a> - Sand and Salt Creek Watershed Project<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/L20.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/L20.jpg" border=0></a> - Sacramento River Watershed Program<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S11.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S11.jpg" border=0></a> - Department of Water Resources<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S18.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S18.jpg" border=0></a> - <br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S19.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S19.jpg" border=0></a> - <br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S25.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S25.jpg" border=0></a> - State Water Resources Control Board<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S3.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S3.jpg" border=0></a> - Department of Fish and Game<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S7.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S7.jpg" border=0></a> - Department of Water Resources<br>
<a href="http://titan.lab.csuchico.edu/compendium/pages/S8.html"><img src="http://titan.lab.csuchico.edu/compendium/graphics/S8.jpg" border=0></a> - Department of Water Resources<br>
<td>
<input name=img type=image src="[img]" width= height= border=0><p>
Navigate:
<select name=zoomdir>
  <option value=1 [zoomdir_1_select]>Zoom In
  <option value=0 [zoomdir_0_select]>Pan
  <option value=-1 [zoomdir_-1_select]>Zoom Out
</select>
Operation:
<select name=mode>
  <option value=browse checked>Browse map
  <option value=query>Pick Sampling Site
</select>
</td></tr>
</table>

<input type=hidden name=layers value="[layers]">
<input type=hidden name=imgext value="[mapext]">
<input type=hidden name=map value="[map]">
<input type=hidden name=zoomsize value="2">
</form>
</body></html>
-------------- next part --------------
#
# Start of map file
#
NAME c
STATUS ON
SIZE 400 400
SHADESET /usr/local/share/ms/ms_symbols/symbols/shade.sym
MARKERSET /usr/local/share/ms/ms_symbols/symbols/marker.sym
LINESET /usr/local/share/ms/ms_symbols/symbols/line.sym
EXTENT -251552 65413.4 -119210 272783
UNITS METERS
SHAPEPATH "/usr/local/apache/htdocs/compendium/data"
IMAGECOLOR 255 255 255
transparent on
# LABELOVERLAP FALSE

#
# web interface
#
WEB
  template /usr/local/apache/htdocs/compendium/maps/central.html
END
#
#
# Start of reference map
#
REFERENCE
  IMAGE "/usr/local/apache/htdocs/compendium/graphics/reference_base.gif"
  EXTENT -373896 -604675 540167 449854
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END

#
# Start of legend
#
LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 0 0 0
    SIZE SMALL
    ANTIALIAS
  END
  SIZE 350 5
  COLOR 255 255 255
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS KILOMETERS
  INTERVALS 5
  STATUS ON
END


#
# Start of layer definitions
#

# county lines

LAYER
  NAME county
  TYPE POLYGON
  STATUS DEFAULT
  DATA countys
  LABELITEM county_nam
  CLASS
    SYMBOL 0
    OUTLINECOLOR 230 230 230
    COLOR 255 255 255
    BACKGROUNDCOLOR 255 255 255
    LABEL
      SIZE SMALL
      TYPE truetype
      font Arial
      BUFFER 2
      COLOR 170 170 170
      POSITION cc
    END
  END
END # county layer

# hydro

LAYER
  NAME hydro
  TYPE LINE
  STATUS DEFAULT
  DATA central_hydro
  TOLERANCE 5
  LABELITEM PNAME
  CLASS
    COLOR  140 169 190 
    LABEL
     SIZE TINY
     COLOR  81 131 183 
    END
  END
END # hydro Layer

# lakes

LAYER
  NAME lakes
  TYPE POLYGON
  STATUS DEFAULT
  DATA central_lakes
  TOLERANCE 3
  CLASS
    COLOR  81 131 183 
  END
END # lakes Layer

# roads

LAYER
  NAME roads
  TYPE line
  status on
  data roads
  tolerance 5
  class
    color 168 155 143
  end
end # roads

LAYER
  NAME sites
  TYPE POINT
  STATUS ON
  DATA central_sites
  LABELITEM "NAME"
  CLASSITEM "ORG_TYPE"
  CLASS
    SYMBOL 0
    COLOR 255 0 0
    EXPRESSION "F"
    LABEL
      POSITION ul
      COLOR 255 0 0
      backgroundcolor  255 255 255 
      buffer 2
    END
  END
  CLASS
    SYMBOL 0
    COLOR 13 130 0
    EXPRESSION "S"
    LABEL
      POSITION ul
      COLOR 13 130 0
      backgroundcolor  255 255 255 
      buffer 2
    END
  END
  CLASS
    SYMBOL 0
    COLOR 211 29 111
    EXPRESSION "L"
    LABEL
      POSITION ul
      COLOR 128 0 128
      backgroundcolor  255 255 255 
      buffer 2
    END
  END

  QUERYITEM "NAME"
  QUERY
    EXPRESSION "^-"
    TEMPLATE "site.html"
  END
END # sites layer

# cities

LAYER
  NAME cities
  TYPE POINT
  STATUS on
  DATA central_cities
  TOLERANCE 10

  LABELITEM "NAME"

  CLASS
    SYMBOL 0
    SIZE 4
    LABEL
      COLOR  0 0 0 
      POSITION ul
      PARTIALS off
      backgroundcolor  200 200 200 
      buffer 5
    END
  END
END # cities layer
END # end of mapfile


More information about the mapserver-users mailing list