[mapserver-users] Using nquery/mapxy/TOLERANCE/TOLERANCEUNITS

Steve Lime Steve.Lime at dnr.state.mn.us
Thu Oct 1 12:47:55 EDT 2009


It's possible to use mapxy in conjunction with TOLERANCEUNITS PIXELS but you
have to understand how pixel size is computed for it to work as expected. The 
assumption is that there's a map associated with the point query and it's defined
by a map extent, a width and a height. So, you'd need to define those somehow
too. If not explicitly set as part of a query the defaults in the mapfile are used which
is where things could get convoluted. I can't recall what happens if you define 
mapxy AND mapext with mode=nquery though, which takes precedence in setting
the query method? (looks ambiguous in the code)

Practically speaking, if a query or whatever is associated with a map image regardless
of client environment I *always* use imgxy, imgext and imgsize and populate those
from the client and let MapServer do the conversion. Works fine with the environments 
I use frequently (e.g. OL and dBox). This site does it extensively via OL:

  http://www.dnr.state.mn.us/waters/csg/index_beta.html

Steve

>>> Brent Fraser <bfraser at geoanalytic.com> 10/01/09 10:51 AM >>>
   I'd like someone to confirm my understanding of using 
nquery/mapxy/TOLERANCE/TOLERANCEUNITS.

   GeoMoose v1.6 sets mapxy and imgext (along with mode=nquery and imgsize) CGI 
variables when doing an "Identify Feature" operation.  I'd like to use 
TOLERANCEUNITS PIXELS (and TOLERANCE 3) for my point layer because I think it's 
more intuitive over a range of scales (as opposed to TOLERANCEUNITS METERS, 
TOLERANCE 500).

   This is not possible as using Mapserver's mapxy requires the map file to have 
TOLERANCEUNITS METERS to work properly.  If I want to use TOLERANCEUNITS PIXELS, 
I must use imgxy instead of mapxy because mapserver does not do the conversion 
from mapxy mapping coords to imgxy image coords.

Is this correct?

Thanks!
Brent Fraser
_______________________________________________
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