[mapserver-users] queryUsingPoint seg fault on demo maps

Jim Burnett jimburnett at ntelos.net
Wed Aug 8 06:37:29 PDT 2001


OK, Now I downgraded to php-4.0.5 also.
I still get
Warning: MapServer Error in msQueryByPoint(): No matching record(s) found.
in /drives/storage1/homes/htdocs/maptest/php/test.php on line 71

I can not seem to pull any data from the ms_demo data files.
Here is my code and map file.

Zooming, and Panning work fine, just cant query for some reason. What am I
missing?


$mapObj = ms_newMapObj("/home/htdocs/maptest/romney.map");
 $ptClicked = ms_newPointObj();
 $ptClicked->setXY($x,$y);
 $queryObj = $mapObj->queryByPoint( $ptClicked,MS_MULTIPLE,-1 );



LAYER
  NAME lakes
  METADATA
    "DESCRIPTION"   "lakes"
    "RESULT_FIELDS" "AREA PERIMETER USCLASS LAKE_NAME"
  END
  TYPE POLYGON
  STATUS ON
  DATA lakespy2

  CLASS
    NAME 'Lakes & Rivers'
    COLOR 49 117 185
    TEMPLATE "demo/lakespy2.html"
  END
  TOLERANCE 3
END # lakes




----- Original Message -----
From: "Jim Burnett" <jimburnett at ntelos.net>
To: "Daniel Morissette" <morissette at dmsolutions.ca>
Cc: <mapserver-users at lists.gis.umn.edu>
Sent: Tuesday, August 07, 2001 5:08 PM
Subject: Re: [mapserver-users] queryUsingPoint seg fault on demo maps


> OK, I switched to GD1.8.4 and MapServer/Script  3.5  (nightly build)
> Instead of a complete crash, I get this. ( better then complete crash)
>
> Warning: MapServer Error in msQueryByPoint(): No matching record(s) found.
> in /drives/storage1/homes/htdocs/maptest/php/test.php on line 71
>
>
> here is my code:
> I am using the shape file and map file provided in the demo, i just
renamed
> it.
>
>
> if ( $map_x && $map_y ) {
>  $mapObj = ms_newMapObj("/home/htdocs/maptest/romney.map");
>
>  $ptClicked = ms_newPointObj();
>  $ptClicked->setXY($x,$y);
>  print $ptClicked . "<br>\n";
>
> #$layerObj = $mapObj->getLayerByName("lakes");
> $queryObj = $mapObj->queryByPoint( $ptClicked,MS_MULTIPLE,-1 );
>
>  #$qObj = ms_newQueryObj($layerObj);
>  #$qObj->setexpression("/./");
>
>
> #$queryObj = $layerObj->queryByPoint( $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";
>  print "queryObj:" . $queryObj . "<br>\n";
> }
>
>
> ----- Original Message -----
> From: "Daniel Morissette" <morissette at dmsolutions.ca>
> To: "Jim Burnett" <jimburnett at ntelos.net>
> Cc: <mapserver-users at lists.gis.umn.edu>
> Sent: Tuesday, August 07, 2001 4:28 PM
> Subject: Re: [mapserver-users] queryUsingPoint seg fault on demo maps
>
>
> > > Jim Burnett wrote:
> > >
> > > 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.
> > >
> > >
> >
> > Jim,
> >
> > Seems like you're running MapScript 3.4 with PHP 4.0.6 ... this
> > combination is known to have a problem which is documented at the
> > following URL:
> >
>
http://www2.dmsolutions.ca/mapserver/php_mapscript/php_mapscript_faq.html#4.
> 5
> >
> > You'll have to either switch to MapServer 3.5 or backtrack to PHP 4.0.5.
> >
> > The following message in the archive also tells you how to patch your
> > MapScript 3.4 if you really can't switch versions of PHP or MapServer:
> >
>
http://mapserver.gis.umn.edu/majordom_lists/archives/mapserver-users/html/01
> 07/msg00204.html
> >
> > --
> > ------------------------------------------------------------
> >  Daniel Morissette               morissette at dmsolutions.ca
> >  DM Solutions Group              http://www.dmsolutions.ca/
> > ------------------------------------------------------------
> >   Don't put for tomorrow what you can do today, because if
> >       you enjoy it today you can do it again tomorrow.
> >
> >
>
>




More information about the MapServer-users mailing list