[Mapserver-users] MapScript query

Eric Bridger eric at gomoos.org
Fri Feb 27 11:10:28 EST 2004


Yes, this is possible. What I've done is loop increasing the tolerance
util I find something (in 3.6 Perl mapscript)

# bathy is lines. We can either use the tolerances above, i.e. click
w/in 10 pixels of a bathy line
# loop to increase tolerance until we find some lines. calling
queryByPoint() each time.
   
while($layerObj->queryByPoint($map,$click_pt,$mapscript::MS_MULTIPLE,undef)){
  $layerObj->{tolerance} += 3;
}

I can send you the whole Perl function if this looks like it might help.





On Fri, 2004-02-27 at 08:57, Hofferek Attila wrote:
> Hi all!
> 
> Sorry about my english...
> Can I made some query with mapscript like this?
> "What is the nearest city (or other object) from my
> $GeoX,$GeoY position, and how far is that?"
> 
> I know, this is possible with properly chosen
> TOLERANCE value, but what if the nearest object is beyond
> the tolerance limits? (And TOLERANCE in pixels is depends
> on zoom factor)
> 

> I hope I was understandable :-)
> 
> -- 
> Hofferek Attila
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 





More information about the mapserver-users mailing list