[Mapserver-users] Win2k Query problem

Sam Choudry samuzzal at linux.net
Wed Apr 28 03:39:24 EDT 2004


Hi,
	
	Thank you for your kind help in solving my Windows 2000 installation problem.
I am trying to implement point query in Windows 2000 Server environment
with Php/Mapscript. The action was a success in Windows 2000 Professional. 
But when I had tryed to use the same code for querying in this new environment, 
ie, Win 2K Server, querybypoint() I was unsuccessful. I have tested
with many tolerance values, but without success.

        The code is given here for your very kind information:

	$query_on = TRUE;
	$map_height = $map->height;
	$map_width  = $map->width;

	$minX = $map->extent->minx;
	$minY = $map->extent->miny;
	$maxX = $map->extent->maxx;
	$maxY = $map->extent->maxy;
	$geo_x = GMapPix2Geo($x_pos,0,$map_width,$minX,$maxX,0);	// Geo X
	$geo_y = GMapPix2Geo($y_pos,0,$map_height,$minY,$maxY,1);	// Geo Y
	$GeoPosition = ms_newPointObj();
	$GeoPosition->setXY($geo_x, $geo_y);
	echo "$geo_x,<br>";
        echo "$geo_y<br>";

	$Layer = $map->getlayerbyname("pt-barama");
	$result = @$Layer->queryByPoint($GeoPosition,MS_SINGLE,10);
        echo "$result";

Can anybody give me a way out. Regards

                                              Samuzzal

                                 

_____________________________________________________________
Linux.Net -->Open Source to everyone
Powered by Linare Corporation
http://www.linare.com/



More information about the mapserver-users mailing list