Searching for closest object in mapserver
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Mon Jul 3 11:16:08 PDT 2006
The normal MapServer Itasca demo does this as does:
http://maps.dnr.state.mn.us/cgi-bin/mapserv46?map=/usr/local/www/docs_maps/mapserver_demos/tests46/query/test.map&program=/cgi-bin/mapserv46&htmlroot=/mapserver_demos/tests46&map_web_imagepath=/usr/local/www/docs_maps/tmp/&map_web_imageurl=/tmp/
The relevant parameters are mode=query and qlayer=[some layer name] (optional). The other piece
is submitting a point to use for the query and there are several ways to do that. Most often you use
imxy/imgext but can also simply send a point in map coordinates using mapxy.
Steve
>>> Jelmer Baas <baas at SPEERIT.NL> 7/3/2006 10:39:50 AM >>>
Steve Lime wrote:
> It is possible with the CGI. A straight mode=query will give you the closest
> feature in qlayer or across mulitiple layers if qlayer is not specified. The search
> will respect any tolerances set within a particular layer.
Thanks, Steve,
Though, I can't seem to find the right combination of which CGI switches
to use. Would you be able to provide me with an example?
--
Jelmer Baas
More information about the MapServer-users
mailing list