[mapserver-users] regarding drawing lines between 2 points

Julien-Samuel Lacroix jlacroix at mapgears.com
Wed Jan 21 05:27:42 PST 2009


Hi,

Something like this (not tested):

$point1 = ms_newPointObj();
$point1->setXY($X1, $Y1);

$point2 = ms_newPointObj();
$point2->setXY($X2, $Y2);

$line = ms_newLineObj();
$line->add($point1);
$line->add($point2);

$shape = ms_newShapeObj(MS_SHAPE_LINE);
$shape->add($line);

$layer = $gpoMap->getLayerByName('selpoint');
$layer->addFeature($shape);

$img = $gpoMap->draw();
$img->saveWebImage();

Julien


Amiya Patra wrote:
> Hi
> 
> plz any one tell me how I will draw lines betweens 2 points by 
> shapeobject (php mapscript)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the MapServer-users mailing list