[Mapserver-users] drawing lines with mapscript

Eric Bridger eric at gomoos.org
Mon Mar 29 17:13:13 EST 2004


On Mon, 2004-03-29 at 16:24, Jeff Hoffmann wrote:
> I'm trying to create lines programmatically & draw them using mapscript, 
> but I just can't seem to get any output.  It doesn't throw any errors, 
> but I don't see any output, either.   
> $layer = $map->getLayerByName('line_layer');
> $layer->{status} = 1;
> $class = $layer->getClass(0);
> $class->setText($layer,"LINE");
> my $shape = new mapscript::shapeObj($mapscript::MS_SHAPE_LINE);
> $shape->add($line);

Just a guess, but you could try $shape->setBounds() here.

> $shape->draw($map, $layer, $img);
 




More information about the mapserver-users mailing list