Query/highlight single or multiple layers

Stefan Schwarzer stefan.schwarzer at GRID.UNEP.CH
Mon Feb 13 09:34:35 EST 2006


I have a point and a polygon layer. Most of the times only the point  
data will be queried, but it can be different too. So, I would like  
to limit the highlighting in the resulting map to (sometimes) only  
the point layer. But in the moment, when drawing a rectangle it  
always highlights the points as well as the polygons.

The doc is saying:

queryByRect( mapObj map, rectObj rect ) : int
Query layer using a rectangle specified in georeferenced map  
coordinates (i.e. not pixels). The query is performed on all the  
shapes that are part of a CLASS that contains a TEMPLATE value or  
that match any class in a layer that contains a LAYER TEMPLATE value.  
Returns MS_SUCCESS if shapes were found or MS_FAILURE if nothing was  
found or if some other error happened.


		//Query the Map
		if (!$imgbox)
			$map -> queryByPoint($click_pt, MS_MULTIPLE, -1);
		else
			$map -> queryByRect($click_rt);



So, it gives me the impression that there is no solution to the problem.

Or can someone help me?

Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060213/8303ee5e/attachment.html


More information about the mapserver-users mailing list