[mapserver-users] FEATUREQUERY with SLAYER

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Tue Jun 24 08:23:34 PDT 2014


So you'll be doing a mode=itemfeaturenquery or itemfeaturequery. The difference is in the number of features the initial attribute query can match n or 1. The mapfile won't help much. The only trick here is getting the line layer setup correctly for attribute queries. Basically, besides being queryable in the first place (e.g. set TEMPLATE),  all that means is that you need to set a validation pattern for the qstring parameter so that you can validate what users enter.

>From there the URLs will be of the form:

  /cgi-bin/mapserv?map=your.map&slayer=lines&qitem=item&qstring=string&qlayer=polygons&mode=itemfeaturenquery

You can query multiple layers using the slayer, just don't use qlayer in that case and the query will run against all queryable layers you have ON or have status=DEFAULT.

Steve

From: Weisbender, Eric [mailto:Weisbend at WAPA.GOV]
Sent: Tuesday, June 24, 2014 10:12 AM
To: Lime, Steve D (MNIT); mapserver-users at lists.osgeo.org
Subject: RE: FEATUREQUERY with SLAYER

Thanks Steve,

I think a look at the mapfile would be helpful.  Here is my scenario...  I have a file with multiple linear features in it.  I would like to type in a line name and return all the polygons that intersect that line.  I think I'm close but I just need to understand better how slayer works.

Thanks,

Eric Weisbender
GIS Program Lead
Western Area Power Administration
(720) 962-7280
weisbend at wapa.gov<mailto:weisbend at wapa.gov>

From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us]
Sent: 2014, June, 24 8:38 AM
To: Weisbender, Eric; mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: RE: FEATUREQUERY with SLAYER

I've used it successfully in a number of places, here's one example:

  http://deli.dnr.state.mn.us/data_search.html

The search by county option uses mode=featurenquery. I can provide more detail if you need it since much of the configuration (and there's not much to it) is in the mapfile.

Steve

From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Weisbender, Eric
Sent: Tuesday, June 24, 2014 8:10 AM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] FEATUREQUERY with SLAYER

Hello List,

I was wondering if there is an example of how to use FEATUREQUERY with SLAYER somewhere that I could reference for a project I am working on where I need to query features that intersect another feature.

Thanks
EW

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140624/d692dafb/attachment.html>


More information about the mapserver-users mailing list