[mapserver-users] Why queryByPoint returns neighbour object
instead of clicked object
shurhenv at mail.ru
Wed Sep 10 02:45:25 EDT 2008
PixelToGeo works fine! I compared mousemove coords with object
coords and they are coincide.
I've tried your script with my data:
and got following result:
msQueryByPoint(): Search returned no results. No matching record(s) found.
i.e. nothing :(
my map has srid = -1, i.e. nonEarth (right?) May be all matter's in
> You could try plotting your query point on the map to help visualize things I
> suppose. Perhaps the PixelToGeo function is off.
> One things I'd try is taking the output from that function and using it to formulate
> a query to the CGI. That would allow you to compare your results against another
> source. You can do this at the command line. The form would be:
>>>> shurhen <shurhenv at mail.ru> 09/08/08 8:25 AM >>>
> Why queryByPoint returns neighbour object instead of clicked object?
> For several days I tried to solve this problem, but things are still
> where they started. Sometimes selection was correct, sometimes
> incorrect. I've noticed if I click in the middle of the object - very
> often selection was incorrect (it was highlighted neighbour object),
> but if if I click nearer to the vertex - right results go more often.
> May be something wrong with projections?
> Here is my code example that I've gathered from many sources
> pointObj a_geopointObj = PixelToGeo(m_map, e);
> a_layer.toleranceunits = (int)MS_UNITS.MS_PIXELS;
> double a_tolerance = -1;
> bool a_foundflag = false;
> while (!a_foundflag && (a_tolerance < 100))
> a_layer.queryByPoint(m_map, a_geopointObj,
> mapscript.MS_SINGLE, a_tolerance);
> using (resultCacheObj results = a_layer.getResults())
> textBoxSRCC1.Text = a_tolerance.ToString();
> a_foundflag = results.numresults > 0;
> if (!a_foundflag)
> What I have missed?
> And then some, I don't understand why tolerance values "-1" does not
> work? Documentation says: "-1" is for MS_PIXELS
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
-------------- next part --------------
An embedded message was scrubbed...
From: shurhen <shurhenv at mail.ru>
Subject: Re: [mapserver-users] Why queryByPoint returns neighbour object
insteadof clicked object
Date: Tue, 9 Sep 2008 18:46:08 +0400
More information about the mapserver-users