Thanks Steve! <br>Thats grea...<br>But I´m looking for more material about that, without <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial; white-space: pre;">sucefully...<br>
Could you point me docs/tutorial/specification about templates/query?<br><br>Paul<br></span></span><br><div class="gmail_quote">On Tue, Jun 23, 2009 at 7:09 PM, Steve Lime <span dir="ltr">&lt;<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The CGI provides to results via templates. Templates operate on the<br>
resultCacheMemberObj<br>
contents and do a layer.getFeature behind the scenes. You need only<br>
concern yourself<br>
with the presentation piece. Through templates you can:<br>
<br>
  - output, and to a certain extent format, attributes<br>
  - output and format coordinates and bounding boxes<br>
  - limit the number of features output<br>
  - control output order of layers<br>
  - define custom mime-types<br>
<br>
RFC 36 is a good place to start for the newer template support. I think<br>
I&#39;ve posted a few<br>
examples to the list as well.<br>
(<a href="http://mapserver.org/development/rfc/ms-rfc-36.html" target="_blank">http://mapserver.org/development/rfc/ms-rfc-36.html</a>)<br>
<br>
Steve<br>
<br>
&gt;&gt;&gt; On 6/23/2009 at 9:42 AM, in message<br>
&lt;<a href="mailto:33fad6880906230742o2036ea6ctae3a3cc003145984@mail.gmail.com">33fad6880906230742o2036ea6ctae3a3cc003145984@mail.gmail.com</a>&gt;, Paul<br>
<div class="im">james<br>
&lt;<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>&gt; wrote:<br>
</div><div><div></div><div class="h5">&gt; Thanks Steve! Great explanation!<br>
&gt; But, in mapscript I got the querýs result getting<br>
resultCacheMemberObj and<br>
&gt; layer.getFeature...<br>
&gt; How can I do something like that using cgi?<br>
&gt;<br>
&gt; Paul<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Jun 22, 2009 at 6:29 PM, Steve Lime<br>
&lt;<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Querying is controlled via the mode parameter. Mode=query does a<br>
point<br>
&gt;&gt; query returning at most 1 result in one layer. Mode=nquery allows<br>
you<br>
&gt;&gt; to query multiple layers and return multiple results from either a<br>
point or<br>
&gt;&gt; a rect. MapServer looks at the various additional supplied<br>
parameters to<br>
&gt;&gt; decide whether to do a point or rect query.<br>
&gt;&gt;<br>
&gt;&gt; For example, this url will drop a point through all queryable layers<br>
that<br>
&gt;&gt; have status DEFAULT (since I&#39;m not explicitly turning anything on)<br>
&gt;&gt;<br>
&gt;&gt;<br>
<a href="http://mapserv.org/cgi-bin/mapserv?map=foo.map&amp;mapxy=x+y&amp;mode=nquery" target="_blank">http://mapserv.org/cgi-bin/mapserv?map=foo.map&amp;mapxy=x+y&amp;mode=nquery</a><br>
<br>
&gt;&gt;<br>
&gt;&gt; and this will do a bbox query:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
<a href="http://mapserv.org/cgi-bin/mapserv?map=foo.map&amp;mapext=minx+miny+maxx+maxy&amp;mode=n" target="_blank">http://mapserv.org/cgi-bin/mapserv?map=foo.map&amp;mapext=minx+miny+maxx+maxy&amp;mode=n</a><br>
<br>
&gt; query<br>
&gt;&gt;<br>
&gt;&gt; You can turn layers on with the layer or layers parameters and can<br>
restrict<br>
&gt;&gt; queries to one layer (if necessary) using qlayer.<br>
&gt;&gt;<br>
&gt;&gt;  mode=query ~ queryByPoint with MS_SINGLE<br>
&gt;&gt;  mode=nquery ~ queryByPoint with MS_MULTIPLE or queryByRect<br>
&gt;&gt;<br>
&gt;&gt; The qlayer parameter has the effect of running the query methods on<br>
a<br>
&gt;&gt; layerObj while without it you&#39;re running on the whole mapObj.<br>
&gt;&gt;<br>
&gt;&gt; Does this help?<br>
&gt;&gt;<br>
&gt;&gt; Steve<br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; On 6/22/2009 at 4:02 PM, in message<br>
&gt;&gt; &lt;<a href="mailto:33fad6880906221402qde8375bj252c48b367d7eb4d@mail.gmail.com">33fad6880906221402qde8375bj252c48b367d7eb4d@mail.gmail.com</a>&gt;, Paul<br>
james<br>
&gt;&gt; &lt;<a href="mailto:pauljame@gmail.com">pauljame@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello guys, I pretty lost with CGI...<br>
&gt;&gt; &gt; Using mapscript, I can get query results with functions<br>
queryByPoint and<br>
&gt;&gt; &gt; queryByRect...<br>
&gt;&gt; &gt; How can I do that in CGI mode?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Paul<br>
&gt;&gt;<br>
&gt;&gt;<br>
</div></div></blockquote></div><br>