[mapserver-users] How to use NQUERY to identify features at a point?

Arjen de Korte arjendk at gmx.net
Tue Mar 3 08:27:02 EST 2009


Steve, Dan,

Thank you for your answers. Using imgext and imgsize was the solution!

In this case query instead of nquery was not an option, since query only
returns one result.

In case I would like to query by bounding box (instead of point), would
the correct query be something like

http://localhost/cgi-bin/mapserv.exe?map=my.map&mode=nquery&mapext=minx+miny+maxx+maxy&layers=points&imgext=1.335555+51.285252+5.678991+55.101323&imgsize=594+522
?

I.e. imgxy for a point query becomes mapext for a bbox query?

Thanks again for your help, kind regards,

Arjen.



On Mon, 02 Mar 2009 08:41 -0600, "Steve Lime"
<Steve.Lime at dnr.state.mn.us> wrote:
> Arjen: Try using imgext instead of mapext, and imgsize instead of
> mapsize. Those params are used
> to convert the mouse click (imgxy) into map coordinates.
> 
> Steve
> 
> >>> "Arjen de Korte" <arjendk at gmx.net> 03/02/09 4:57 AM >>>
> Dear Mapserver users,
> 
> I would like to use a Mapserver NQUERY to identify features at a point
> on a map. I am now calling the following url using AJAX (I have defined
> XML templates in my mapfile to get an XML result):
> 
> http://localhost/cgi-bin/mapserv.exe?map=my.map&mode=nquery&imgxy=45+246&layers=points&mapext=1.335555+51.285252+5.678991+55.101323&mapsize=594+522
> 
> I am getting a result, but Mapserver returns ALL features in the given
> bounding box (mapext), while I would like to get the features around the
> point given in imgxy (within the tolerance as defined in the mapfile). I
> have also tried this with mapxy and map coordinates instead of imgxy,
> but this gives the same results.
> 
> My Mapserver version is 5.0.0.
> 
> Could someone instruct me on the correct usage of NQUERY in this case?
> 
> Thank you, kind regards,
> 
> Arjen.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


More information about the mapserver-users mailing list