[mapserver-users] Querying map using CGI ...

Paul james pauljame at gmail.com
Wed Jun 24 10:04:58 EDT 2009


Thanks Steve!
Thats grea...
But I´m looking for more material about that, without sucefully...
Could you point me docs/tutorial/specification about templates/query?

Paul

On Tue, Jun 23, 2009 at 7:09 PM, Steve Lime <Steve.Lime at dnr.state.mn.us>wrote:

> The CGI provides to results via templates. Templates operate on the
> resultCacheMemberObj
> contents and do a layer.getFeature behind the scenes. You need only
> concern yourself
> with the presentation piece. Through templates you can:
>
>  - output, and to a certain extent format, attributes
>  - output and format coordinates and bounding boxes
>  - limit the number of features output
>  - control output order of layers
>  - define custom mime-types
>
> RFC 36 is a good place to start for the newer template support. I think
> I've posted a few
> examples to the list as well.
> (http://mapserver.org/development/rfc/ms-rfc-36.html)
>
> Steve
>
> >>> On 6/23/2009 at 9:42 AM, in message
> <33fad6880906230742o2036ea6ctae3a3cc003145984 at mail.gmail.com>, Paul
> james
> <pauljame at gmail.com> wrote:
> > Thanks Steve! Great explanation!
> > But, in mapscript I got the querýs result getting
> resultCacheMemberObj and
> > layer.getFeature...
> > How can I do something like that using cgi?
> >
> > Paul
> >
> >
> > On Mon, Jun 22, 2009 at 6:29 PM, Steve Lime
> <Steve.Lime at dnr.state.mn.us>wrote:
> >
> >> Querying is controlled via the mode parameter. Mode=query does a
> point
> >> query returning at most 1 result in one layer. Mode=nquery allows
> you
> >> to query multiple layers and return multiple results from either a
> point or
> >> a rect. MapServer looks at the various additional supplied
> parameters to
> >> decide whether to do a point or rect query.
> >>
> >> For example, this url will drop a point through all queryable layers
> that
> >> have status DEFAULT (since I'm not explicitly turning anything on)
> >>
> >>
> http://mapserv.org/cgi-bin/mapserv?map=foo.map&mapxy=x+y&mode=nquery
>
> >>
> >> and this will do a bbox query:
> >>
> >>
> >>
> >
>
> http://mapserv.org/cgi-bin/mapserv?map=foo.map&mapext=minx+miny+maxx+maxy&mode=n
>
> > query
> >>
> >> You can turn layers on with the layer or layers parameters and can
> restrict
> >> queries to one layer (if necessary) using qlayer.
> >>
> >>  mode=query ~ queryByPoint with MS_SINGLE
> >>  mode=nquery ~ queryByPoint with MS_MULTIPLE or queryByRect
> >>
> >> The qlayer parameter has the effect of running the query methods on
> a
> >> layerObj while without it you're running on the whole mapObj.
> >>
> >> Does this help?
> >>
> >> Steve
> >>
> >> >>> On 6/22/2009 at 4:02 PM, in message
> >> <33fad6880906221402qde8375bj252c48b367d7eb4d at mail.gmail.com>, Paul
> james
> >> <pauljame at gmail.com> wrote:
> >> > Hello guys, I pretty lost with CGI...
> >> > Using mapscript, I can get query results with functions
> queryByPoint and
> >> > queryByRect...
> >> > How can I do that in CGI mode?
> >> >
> >> > Thanks
> >> >
> >> > Paul
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090624/ac6d07a5/attachment-0001.html


More information about the mapserver-users mailing list