[Mapserver-users] $lyr->getShape($shape,$tile,$record) problem
Lowell Filak
lfilak at medinaco.org
Fri Feb 14 21:44:33 PST 2003
What do you get if you add:
print "Type = $shape->{type}\n";
after "numlines:$num_lines\n"?
Lowell F.
The following message was sent by Eduardo Spremolla <edspremolla at Antel.com.uy> on 14 Feb 2003 15:29:32 -0300.
> Can some one point me to why I always get $shape->{numlines} == 0 ???
>
> Thanks in advance
>
> Spinet of a heavy hacked qry_point.pl examle from the wiki
> PerlMapScript
>
>
> my $lyr = $map->getLayerByName("ejes") or die('Unable to Open Boundary
> Layer!');
> $lyr->{status} = $mapscript::MS_ON;
> # Query the layer using the created point.
> my $zz=$lyr->queryByPoint($map,$pnt,$mapscript::MS_MULTIPLE,0);
> # Create a resultcache object to see how many results.
> my $rsltcache = $lyr->{resultcache};
> #
> # How many matches did we find.
> $cantidad=$rsltcache->{numresults};
> if ( $cantidad == 0 ) {exit;}
> #
> # Grab the first result (there should only be one).
> my $rslt = $lyr->getResult(0);
> # What is the shape number.
> my $record = $rslt->{shapeindex};
> my $tile = $rslt->{tileindex};
> $shape= new shapeObj(-1);
> $zz=$lyr->getShape($shape,$tile,$record);
> print "Retorno $zz\n";
> my $num_lines = $shape->{numlines};
> print "numlines:$num_lines\n";
> $nombre=$shape->getValue(7);
> print "NOM:$nombre\n";
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list