[mapserver-users] queryByAttribute()

Stephen Woodbridge woodbri at swoodbridge.com
Fri Apr 26 14:08:07 EDT 2002


OK, does anyone know how queryByAttribute() is supposed to be used?

I put my guess below, but I haven't tried it, and Stefano has been
trying to get an answer on this for a few days without much success.

-Steve

Daniel Morissette wrote:
> 
> Steve,
> 
> I believe what you suggest should work in MapScript, but I never used
> queryByAttribute() myself so I can't confirm anything.  About the
> ITEMQUERY and ITEMNQUERY CGI modes, I never used them directly so I
> can't tell you much about them either
> 
> Seems that you touched an area of MapServer that I'm less familiar
> with... you may have more luck asking Steve Lime, or by Emailing the
> list directly... :)
> 
> Daniel
> 
> Stephen Woodbridge wrote:
> >
> > Stefano,
> >
> > This might work for you, but I think (but I am not sure) that you can do
> > the same thing in Mapscript by:
> >
> > 1) set the extents to the area you want to search
> > 1a) make sure you have TEMPLATE defined for the layers you want to query
> > 2) set the filteritem to the query you want to perform
> >    (this is the step I am guessing, otherwise I'm not sure how
> >    you would specify what the queryByAttribute query would be.)
> > 3) call queryByAtrribute(mode) where mode = MS_SINGLE or MS_MULTILE
> > 4) use getNumResult() and getResult(index) to fetch results.
> >
> > I think this is equivalent to ITEMQUERY and ITEMNQUERY
> >
> > Dan, can you confirm this for us?
> >
> > -Steve W.
> >
> > Stefano Bonnin wrote:
> > >
> > > Hi,
> > >
> > > I have just looked at this examples:
> > >
> > > http://maps.dnr.state.mn.us/mapserver_demos/tests/itemquery/test.html
> > >
> > > they use mapserver cgi functionality.
> > >
> > > ITEMQUERY and ITEMNQUERY are the right parameters for me. I think.
> > >
> > > What do you think about this way?
> > > In my application I use Mapscript but only for this query I could use this
> > > method.
> > >
> > > Stefano B.
> > >
> > > ----- Original Message -----
> > > From: "Stephen Woodbridge" <woodbri at swoodbridge.com>
> > > To: "Stefano Bonnin" <shpr at libero.it>
> > > Cc: <mapserver-users at lists.gis.umn.edu>
> > > Sent: Friday, April 26, 2002 2:10 PM
> > > Subject: Re: [mapserver-users] Street Searching
> > >
> > > > Stefano,
> > > >
> > > > I wrote a separate CGI program to do this. You could write it in C or
> > > > Perl or whatever. It does the address lookup by scanning the approprate
> > > > shape files and when it has a result it sends a client redirect to the
> > > > browser to get it to load the map with the Lat/Long result for the
> > > > search results.
> > > >
> > > > I think you will find this much easier to do if you think about doing it
> > > > outside of mapserver/mapscript and only send the final result to get
> > > > mapserver to display the answer.
> > > >
> > > > -Steve W.
> > > >
> > > > Stefano Bonnin wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I have to develop a Street Searching function where
> > > > >
> > > > > the user can insert City and Street ( and number) and the application
> > > must
> > > > > display the map centered on this street.
> > > > >
> > > > > How can I do that with mapserver?
> > > > > Can you give me an Hint in order to do this.
> > > > >
> > > > > I read the PHP Map/documentation but I did't find any query of this
> > > type.
> > > > > My personal solution is the following:
> > > > >
> > > > > with a PHP application I get the user input (Street and City) and I
> > > query to
> > > > > the database in order to find the object ID, then, I "say" to mapserver
> > > to
> > > > > create a map with this object ....
> > > > >
> > > > > Someone can say me if this is a possible solution or if there are a more
> > > > > simple solution?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Stefano B.
> > > > >
> > > > > ---
> > > > > Outgoing mail is certified Virus Free. (FLASHH!)
> > > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > > Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/02
> > >
> > > ---
> > > Outgoing mail is certified Virus Free. (FLASHH!)
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/02



More information about the mapserver-users mailing list