[mapserver-users] basic search question

kenboss kenboss at dilbert.dnr.state.mn.us
Thu Aug 23 10:56:57 EDT 2001


It's been a while, but I'll take a shot.  I can think of a couple of ways to get there.  

If you have x,y coordinates for the centers of your parcels in your mysql database, you can just run 
your search, grab the results, and redirect to a url like:

http://myserver.com/cgi-bin/mapserver?map=parcel.map&mapxy=x_from_mysql+y_from_mysql&scale=150000


If you have a common unique parcel ID in both the mysql database and the parcels shapefile, you can 
grab that ID from your search and then redirect to something like:

http://myserver.com/cgi-bin/mapserver?map=parcel.map&qlayer=parcels&mode=itemquery&item=parcelID&value
=unique_ID_from_mysql

In turn, in your mapfile your parcels layer would have a query template like:

http://myserver.com/cgi-bin/mapserver?map=parcel.map&mapext=[shpext]

to display the map.

At least, that's how I'd approach it from ms_3.3.  I understand itemquery has changed in 3.5, and 
there may be better ways to get there.



Hope this helps,

--Ken Boss
  MN DNR Forestry Resource Assessment


> From: "Jim Burnett" <jimburnett at ntelos.net>
> To: <mapserver-users at lists.gis.umn.edu>
> Subject: [mapserver-users] basic search question
> Date: Thu, 23 Aug 2001 08:44:19 -0400
> MIME-Version: 1.0
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
> 
> Can I do a seach on my standard database(mysql) for an address, and then pop up the parcel(map) 
based on my search?
> 
> So, can I create a map, based on search results?
> I know I can click in the map, and query were I am clicking, but I want to do the opposite, and do a 
search, then display the map....
> 
> 
> 
> 
> -jim
> 




More information about the mapserver-users mailing list