[mapserver-users] msQueryByPoint(): No matching record(s)
Stephen Lime
steve.lime at dnr.state.mn.us
Fri Aug 31 07:15:38 PDT 2001
How recent is your version? There have been changes made over that last
3 weeks that fix bugs releated to queries. My testing has things working
very well now.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Sylvain Pasche <sylvain.pasche at epfl.ch> 08/31/01 01:59AM >>>
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