[mapserver-users] msQueryByPoint(): No matching record(s)

Sylvain Pasche sylvain.pasche at epfl.ch
Thu Aug 30 23:59:24 PDT 2001


Hello, 

I'm using php-mapscript with mapserver version 3.5.
I'm having problems with the new function queryByPoint. In fact, it
worked quite well when I tested it with version 3.4, but it does not
work anymaore with the 3.5: it always fails and returns No matching record(s) found. 

In My mapfile, there is:

LAYER
  NAME courses
  TYPE POINT
  STATUS ON
  DATA courses
  LabelItem "NOM"
  LabelMaxscale 99999
  LabelMinscale 10000
    
  CLASS
     SYMBOL 14
     MAXSIZE 15
     OUTLINECOLOR 255 0 0
     COLOR 255 0 0
      LABEL
       TYPE bitmap
        COLOR 255 0 0
        BACKGROUNDCOLOR 255 220 220
       POSITION AUTO
     END
  END   
  HEADER "ID NOM ALTITUDE COORD_X COORD_Y"
  TOLERANCE 12
  CLASSITEM "ID"
  CLASS  
    EXPRESSION /./
    TEMPLATE "ttt"
  END
END 

and the actual code for the query:

	$ClickPixX =  intval($c_vars['CLICK_x']);
	$ClickPixY = intval($c_vars['CLICK_y']);
  	
	$ClickGeoX = GMapPix2Geo($ClickPixX, 0, $WidthPix, 
				  $MinX, $MaxX, 0);
	$ClickGeoY = GMapPix2Geo($ClickPixY, 0, $HeightPix, 
				      $MinY, $MaxY, 1);
	$oClickGeo = ms_newPointObj();
	$oClickGeo->setXY($ClickGeoX, $ClickGeoY);
	$gpoQueryResults = $Map->queryByPoint($oClickGeo, MS_MULTIPLE, -1); 



Thanks for any help.

	   Sylvain




More information about the MapServer-users mailing list