how to addfeature to line layer by perl

huanxiang xu huanxiangxu at YAHOO.COM.CN
Tue Jun 12 13:51:02 EDT 2007


I know how to addfeature to point layer,
but how to addfeature to line layer

my $layer=$map->getLayerByName('cruise');
    my $poi=new mapscript::pointObj(182.880000,14.090000);my $poi1=new mapscript::pointObj(180.880000, 13.090000);
    my $lin=new mapscript::lineObj();
    $lin->add($poi);$lin->add($poi1);
    my $shap=new mapscript::shapeObj();
    $shap->add($lin);
    #$layer->addFeature($shap);
    return $map;

Is it right?
The perl give me the message: Can't call method "save" on an undefined value

BR, 
xu


       
---------------------------------
 ÑÅ»¢Ãâ·ÑÓÊÏä3.5GÈÝÁ¿£¬20M¸½¼þ£¡
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070613/78ded755/attachment.html


More information about the mapserver-users mailing list