[mapserver-users] plz response immediate (deadline)

2009-01-21 Thread Amiya Patra
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();
 $shp[$i] = ms_newShapeObj(MS_SHAPE_POINT);
 $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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] plz response immediate (deadline)

2009-01-21 Thread Amiya Patra
Hi
I mean to say how I will connect two points.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] plz response immediate (deadline)

2009-01-21 Thread José María Michia
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