shape->line() ?

Doyon, Jean-Francois Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Mon Sep 11 12:10:29 EDT 2000


Hello,

Why is this not working ?

        $querypoint = ms_newpointobj();
        $querypoint->setXY($centerx,$centery);
        $queryres = $reslay->queryusingpoint($querypoint,MS_SINGLE,-1);
        $shapendx = $queryres->next();
        $shpfile =
ms_newshapefileobj("/home/mapdata/common/shapefiles/tmp/".$shpname,-1);
        $shpres = $shpfile->getshape($shapendx);
        $lineres = $shpres->line(0);
        $pointres = $lineres->point(0);
        header("Location:
details.php3?lat=$pointres->x&long=$pointres->y&reclist=$reclist");

I'm getting :

Fatal error: Call to unsupported or undefined function line() in
/home/httpd/html/ccatlas/search/map.php3 on line 224

I checked the code (php_mapscript.c) and the function does seem to be there
... and $shpres IS an Object.

What am I missing ?

J.F.

> ----------
> From: 	Daniel Morissette[SMTP:danmo at videotron.ca]
> Sent: 	Friday, September 08, 2000 4:32 PM
> To: 	kibez
> Cc: 	mapserver-users at lists.gis.umn.edu
> Subject: 	Re: How to mark object on a map using PHP/MapScript ??
> 
> kibez wrote:
> > 
> > Unfortunately the given code does not work!!!
> > 
> > ..........................
> > $img = $gpoMap->draw();
> > 
> > $point[0]=3396429;
> > $point[1]=6490035;
> > 
> > $oMarkPoint = ms_newpointobj();
> > $oMarkPoint->setxy($point[0], $point[1]);
> > 
> > $oLayerAddress = $gpoMap->getlayerbyname("address_point");
> > $oMarkPoint->draw($gpoMap, $oLayerAddress, $img, "", "!!!!!!!!!!");
> > 
> >                   Fatal error:  Call to unsupported or undefined
> > function draw() in map.php3 on line 675
> > ...................................
> 
> 
> Sorry for the late reply!
> 
> The pointObj and rectObj draw() methods were implemented but were not
> properly registered.  I fixed this, and that should be part of the next
> MapServer release.
> 
> -- 
> ------------------------------------------------------------
>  Daniel Morissette                       danmo at videotron.ca
>               http://pages.infinit.net/danmo/
> ------------------------------------------------------------
>   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