[mapserver-users] Problem with queryByPoint

Bistrais, Bob Bob.Bistrais at maine.gov
Wed Nov 9 09:21:48 EST 2011


Problem solved (slapping myself on forehead)- I forgot to include a
template with the queried layer.

 

________________________________

From: Bistrais, Bob 
Sent: Tuesday, November 08, 2011 2:19 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Problem with queryByPoint

 

Mapserver 5.6/MS4W 3.2.1-

I am trying to some  Php-Mapscript code to do a QueryByPoint on a line
shapefile.  For testing, I've created a new point object, and have hard
coded the x,y at a known location. 

 

No matter what I do, the query keeps returning 0 records found.  I set a
generous search radius, still no go.  Any suggestions?

 

Not sure if this code sample will be useful, but (data is in EPSG 26919,
UTM meters):

 

 

$myMap = ms_newMapObj("/ms4w/apps/broadband/maps/broadband.map");

$selectLayer = $myMap->getLayerByName("broadband");

 

$xCoord = 434802;

$yCoord = 4907306;

 

$myPoint = ms_newPointObj();

$myPoint->setXY($xCoord,$yCoord);

$selectLayer->queryByPoint($myPoint,MS_MULTIPLE,20);     //---Returns 0
results

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111109/3a41c472/attachment.html


More information about the mapserver-users mailing list