[Mapserver-users] more (known issue: no results with QueryByPoint (Mapserver 3.7 PHP mapscript))

Michael Härtel mhaerte1@gwdg.de
Wed, 21 May 2003 17:01:21 +0200


Thanks to all for the answers.

according to the contributions i changed my map file to this (i added a 
class even hough i dont want to show it in th map but it seems to be 
turned on and therefor switched to visible status to be queried):

LAYER	#wrs2

NAME "WRS-2_frame"
	PROJECTION
		proj=longlat
		ellps=WGS84
		datum=WGS84
		no_defs
	END

   DATA "wrs2/wrs2"
   STATUS ON
   TYPE POLYGON

   CLASS #all frames
		NAME "WRS-2 frames"
		#COLOR 200 200 200
		OUTLINECOLOR 255 0 0
		STATUS ON
   END # country border

   TOLERANCEUNITS kilometers
   TOLERANCE 5
   DUMP TRUE

   HEADER "H:\_webroot_\mapserv_header.html"
   TEMPLATE "H:\_webroot_\mapserv_query_template.html"
   FOOTER "H:\_webroot_\mapserv_footer.html"

END # layer wrs2

in the PHTML File i use these lines to perform the query:

$query=$querylayer->QueryByPoint($my_point_geo,MS_MULTIPLE,-1);

$my_point_geo is a point object with geographic coordinates:

(object(point)(4) { ["_handle_"]=>  resource(49) of type (Unknown) 
["x"]=>  float(18.454166666666) ["y"]=>  float(31.758333333335) ["m"]=>)

target_layer is "->getlayerbyname('WRS-2 frame')";

AND: SOMETHING CHANGED:
The message "Warning: MapServer Error in msQueryByPoint(): No matching 
record(s) found" does not appear anymore (success!)

BUT: $query is an integer, that ALWAYS is "0"! i think $query should 
return "MS_SUCCESS" (1) if some objects in the shape file were found but 
it doesn't!

So i think my situation has not really changed :(

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users