[mapserver-users] queryUsingPoint seg fault on demo maps

Jim Burnett jimburnett at ntelos.net
Tue Aug 7 12:39:54 PDT 2001


I get a segfault when try to do a queryUsingPoint...I am testing with the demo maps....My map browsing works like zooming and panning, but now I want to query the map data when I click on an area, and return data from the attribute data. Like the area of the lake and miles and stuff.


I get a segfault, and the rest of the script doesnt run....
also, I renamed the demo.map file to romney.map 

if ( $map_x && $map_y ) {
 $mapObj = ms_newMapObj("/home/htdocs/maptest/romney.map");   
 $ptClicked = ms_newPointObj();
 $ptClicked->setXY($x,$y);
 $layerObj = $mapObj->getLayerByName("lakes");
 $queryObj = $layerObj->queryUsingPoint( $ptClicked,MS_MULTIPLE,3 );

 print  "click X Y:" . $map_x . " x " . $map_y . "<br>\n";
 print "mapObj->name:" .  $mapObj->name . "<br>\n";
 print "mapObj->numlayers:" . $mapObj->numlayers . "<br>\n";
 print "layerObj->numqueries:" . $layerObj->numqueries . "<br>\n";
 print "layerObj->other:" . $layerObj->queryitem . "<br>\n";
 print "queryObj->numresults:" . $queryObj->numresults . "<br>\n";
}


the layer definition in the map file...


LAYER
  NAME lakes
  TYPE POLYGON
  STATUS ON
  DATA lakespy2

  CLASS
    NAME 'Lakes & Rivers'
    COLOR 49 117 185
  END

  HEADER "demo/lakespy2_header.html"
  FOOTER "demo/lakespy2_footer.html"

  QUERY
    TEMPLATE "demo/lakespy2.html"
  END
  TOLERANCE 3
END # lakes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010807/a78c3aea/attachment.htm>


More information about the MapServer-users mailing list