[mapserver-users] Drawing a line with a arrow
Greetings to all... I'm need to draw a line with the indication of the direction. Is any way to do this? Thanks -- Rui Gomes ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Drawing a line
If you just want to pass the feature in using a URL configuration, you wouldn't need to use mapscript. Just have the empty layer in your map file and then pass the feature definition in like: map_layer[3]=FEATURE+POINTS+-67.012+-16.952+-67.012+-17.450+END+TEXT+'A+test+line'+END... David. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger André Sent: Thursday, October 16, 2008 11:11 AM To: ramya srinivasan Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Drawing a line Do you mean given as in submitted via a web page? In that case I think I would use Python mapscript to add a LAYER similar to the one I sent below, but using the form variables submitted from the web page as the POINTS values. Take a look at the chapter on Python Mapscript in the O'Reilley Web Mapping Illustrated book. It explains it more clearly than I'm probably able to. Perhaps someone else on the list has another idea. -- On Wed, Oct 15, 2008 at 9:40 PM, ramya srinivasan [EMAIL PROTECTED] wrote: Hi, Thanks for yor reply.Can u please tell me how to draw a line between two points given by the user? On Wed, Oct 15, 2008 at 10:23 PM, Roger André [EMAIL PROTECTED] wrote: You can add a new LAYER with a FEATURE that has the 2 points specified in it, like this: LAYER NAME 'line' STATUS DEFAULT TYPE LINE FEATURE POINTS -67.012 -16.952 -67.012 -17.450 END END CLASS STYLE COLOR 255 0 0 WIDTH 2 END END # class END # layer ## On Wed, Oct 15, 2008 at 3:42 AM, ramya srinivasan [EMAIL PROTECTED] wrote: Hi, How to draw a line on the map between two points given by the user? What all should be included in the mapfile for this line layer. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Drawing a line
You can add a new LAYER with a FEATURE that has the 2 points specified in it, like this: LAYER NAME 'line' STATUS DEFAULT TYPE LINE FEATURE POINTS -67.012 -16.952 -67.012 -17.450 END END CLASS STYLE COLOR 255 0 0 WIDTH 2 END END # class END # layer ## On Wed, Oct 15, 2008 at 3:42 AM, ramya srinivasan [EMAIL PROTECTED]wrote: Hi, How to draw a line on the map between two points given by the user? What all should be included in the mapfile for this line layer. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Drawing a line
Hi, How to draw a line on the map between two points given by the user? What all should be included in the mapfile for this line layer. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Drawing a Line From A Set Start Point to End Point
Hi Lena, if tried this code and it works. $mypoints=array( array(1,1), // 1. point array(40,1), // 1. point array(40,80), // 1. point array(1,80), // 1. point array(1,1), // 1. point ) $myline=ms_newLineObj(); foreach ($mypoints as $key = $value) { $myline-addXY($value[0],$value[1]); } //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); Erik 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* ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users