[mapserver-users] Drawing a Line From A Set Start Point to End Point
Lena Olympio
myheartsnflorida at gmail.com
Wed Jul 16 09:01:13 PDT 2008
Hello,
I am trying to draw tornado paths on my map that I am creating, but I am
having a little bit of trouble because now it won't even plot the initial
point on my map. The following is my code for attempting to draw a line from
start to finish. If anyone has any helpful information, it would be greatly
appreciated
while($row=mysql_fetch_assoc($result)){
$mypoint=ms_newPointObj();
$mypoint->setXY($row['lon_td'],$row['lat_td']);
$myline=ms_newLineObj();
$myline->add($mypoint);
$endpoint=ms_newPointObj();
$endpoint->setXY($row['lon_lift'],$row['lat_lift']);
$myline->add($endpoint);
$mypoint->draw($map,$this_layer_tornado,$image,0,'');
}
//Create the shape object that will be added to the layer
$shape=ms_newShapeObj(MS_SHAPE_LINE);
$shape->add($myline);
$this_layer_tornado->addFeature($shape);
Thank you,
Lena
--
*Lena Olympio*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080716/ea08213f/attachment.htm>
More information about the MapServer-users
mailing list