<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>MapServer Query QuickStart</title>
</head>

<body bgcolor="#FFFFFF">

<p><font size="4" face="Arial"><strong>MapServer Query QuickStart</strong></font></p>

<p>&nbsp;</p>

<p><font face="Arial"><strong>What MapServer can do with little
effort on your part</strong></font></p>

<p><font face="Arial"><u>1. Query by spatial region</u></font></p>

<blockquote>
    <p><font face="Arial">From a single mouse click (or bounding
    box), display attributes for the geographical objects in the
    area. This can be features in one, some, or all themes
    (layers).</font></p>
    <p><font face="Arial">The implementor's tasks:</font></p>
    <ol>
        <li><font face="Arial">Decide which layers will be
            queriable from the user-interface. In the map
            configuration file, add a QUERY entry for each of the
            layers to be queried</font>:</li>
    </ol>
    <blockquote>
        <pre>
LAYER
  NAME Cities
  TYPE POLYGON
  STATUS ON
  DATA cities
  CLASS
    NAME Cities
    SYMBOL 2
    COLOR  0 0 0
  END # class
  QUERY
    TEMPLATE cities.html
  END # Query
END # Layer
</pre>
    </blockquote>
    <ol type="1" start="2">
        <li><font face="Arial">Create a &quot;template&quot; HTML
            file to hold the query results. The keywords in the
            &quot;[ ]&quot; can be either MapServer keywords or
            field names in the DBF file related to the layer's
            shapefile:</font></li>
    </ol>
    <blockquote>
        <p><br>
        <font size="2" face="Courier New">Result [rn]
        ([cl])&lt;br&gt;<br>
        <br>
        &lt;menu&gt;<br>
        City name is: [PPPTNAME]<br>
        &lt;/menu&gt;<br>
        <br>
        &lt;p&gt;</font></p>
    </blockquote>
    <p><font face="Arial"></font>&nbsp;</p>
    <ol type="1" start="2">
        <li value="3"><font face="Arial">Edit the
            &quot;main&quot; web HTML file to make sure there are
            HTML controls to set MapServer's &quot;mode&quot;
            variable to &quot;query&quot;:</font></li>
    </ol>
    <blockquote>
        <p><font size="2" face="Courier New">&lt;input
        type=&quot;radio&quot; name=&quot;mode&quot;
        value=&quot;browse&quot; checked&gt; &lt;b&gt;Browse
        map&lt;/b&gt;&lt;br&gt;<br>
        &lt;blockquote&gt;<br>
        &lt;input type=radio name=zoomdir value=0
        [zoomdir_0_check]&gt; Pan &lt;br&gt;<br>
        &lt;input type=radio name=zoomdir value=1
        [zoomdir_1_check]&gt; Zoom In &lt;br&gt;<br>
        &lt;input type=radio name=zoomdir value=-1
        [zoomdir_-1_check]&gt; Zoom Out &lt;br&gt;<br>
        Zoom Size: &lt;input type=text name=zoomsize size=4
        value=2&gt; &lt;br&gt;<br>
        &lt;/blockquote&gt;<br>
        &lt;input type=&quot;radio&quot; name=&quot;mode&quot;
        value=&quot;query&quot;&gt; &lt;b&gt;Query
        feature&lt;/b&gt;&lt;br&gt;<br>
        &lt;input type=&quot;radio&quot; name=&quot;mode&quot;
        value=&quot;nquery&quot;&gt; &lt;b&gt;Query multiple
        features&lt;/b&gt;</font></p>
    </blockquote>
    <p><font face="Arial"></font>&nbsp;</p>
    <p><font face="Arial">The user's task would be to select the
    &quot;query&quot; control on web page and click the area near
    the feature. Mapserver will do the searching and present the
    results by substituting values in the HTML template</font><br>
    </p>
    <p><font face="Arial">Note that queries don't work on tiled
    shapefiles.</font></p>
    <p>&nbsp;</p>
</blockquote>

<p><font face="Arial"><strong>What MapServer can do with some
effort on your part:</strong></font></p>

<p>&nbsp;</p>

<p><font face="Arial"><strong>What MapServer can't do (unless you
are a programmer):</strong></font></p>
</body>
</html>