Searching for closest object in mapserver

Fawcett, David David.Fawcett at STATE.MN.US
Wed Jul 5 05:52:03 PDT 2006


Jelmer, 

You may want to set a TOLERANCE value (and possibly TOLERANCEUNITS) at
the layer level.  Take a look at the documentation:
http://mapserver.gis.umn.edu/docs/reference/mapfile/layer

David

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Jelmer Baas
Sent: Tuesday, July 04, 2006 3:37 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Searching for closest object in
mapserver


Steve Lime wrote:
> 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.

I'm still at a loss. I checked out the demo, and it works OK. I also 
changed some stuff to use coordinates instead of image x/y, this works.

But I'm not clicking inside a big area, I'm clicking *SOMEWERE* and then

need to find out which cable is closest to the point where I clicked.

I use this now:
scripts/mapserv.exe?mode=query&map=test.map&imgext=-70000+280000+400000+
630000&layers=TABCAB&mapxy=5000+290000&qlayer=TABCAB

but this ofcourse gives me "No results" message, because I'm not 
clicking directly on a cable.

Any thoughts how to do what I want?



-- 
Jelmer Baas



More information about the MapServer-users mailing list