2009/1/21 Amiya Patra <amiyapatra...@gmail.com>: > hi > But I am not getting how to addtwo points via shapeobj as I already placed > points in my map file. my function is like this.... > function AddPoints ( $map, $qresult ) > { > $i = 0; > foreach($qresult as $row) > { > > $poi[$i] = ms_newPointObj(); > $ln[$i] = ms_newLineObj();
Maybe one problem is the following line: > $shp[$i] = ms_newShapeObj(MS_SHAPE_POINT) You must create a new shape of type LINE, not POINT. Change this line to: > $shp[$i] = ms_newShapeObj(MS_SHAPE_LINE) > ; > $poi[$i]->setXY($row[1],$row[2]); > $ln[$i]->add($poi[$i]); > $shp[$i]->add($ln[$i]); > $shp[$i]->set(index, $row[0]); > $this_layer->addFeature( $shp[$i] ); > $i++; > } > > } // end AddPoints > plz response ....... > thanks Perhaps there are other issues with your problem, I hope not! Saludos José María _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users