<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>Long, long ago, I
posted to this forum asking for guidance on drawing a point
layer(</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2><A
href="http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0403/msg00562.html">http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0403/msg00562.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>). Thanks to
the help of the folks on this list, I was able to get the application
working. First off, I created a layer for each symbol I wanted to
use(in the mapfile, see below</FONT></SPAN><SPAN class=653531023-29062005><FONT
face=Arial size=2>). The php app which uses the mapfile will create a
new PointObj for each coordinate returned by a query, look up the name of
the symbol layer associated with the gps source, then call PointObj->draw
with the layer as an argument(see my equally inscrutable code fragment
below). This works nicely for drawing dots on the map, however there is
now a new twist. I would like to use triangular symbols in my layer,
rotated relative to the point which follows. For instance, if the first
coordinate was (1,1), and the second was (5,1), I would like to rotate the first
symbol to the right by 90 degrees so that it is "pointing" at the second
symbol. I think labels support this with the "angle" attribute, but I
didn't find anything in the documentation indicating that points/symbols could
be rotated in the same way. Any ideas?</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>A million
thanks!</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2>Kasey</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2># mapfile fragment:
</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2> # LAYER
object</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>
LAYER<BR> NAME "point_mapping-red"<BR> TYPE
POINT<BR> STATUS ON<BR> # CLASS
object<BR> CLASS<BR> NAME
"points_red"<BR> SYMBOL
"gps_coordinate-red"<BR> COLOR 255 0
0<BR> # LABEL
object<BR>
LABEL<BR> POSITION
CC<BR> SIZE
TINY<BR> MINDISTANCE
400<BR> MINFEATURESIZE
5<BR> COLOR 255 255
255<BR> PARTIALS
FALSE<BR> END<BR> END<BR>
END</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>// php
fragment:</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005> <FONT face=Arial
size=2>// retrieve associative array of gps coordinates</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>
$point_array = $currObjUnit->get_gps_coordinates();</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> // loop through array<BR>
foreach($point_array as $arPoints) {</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> // get a new point
object </FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> $pointObj_coord1 =
ms_newPointObj(); <BR></DIV></FONT></SPAN>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> // set the X and Y
coords<BR></FONT></SPAN><SPAN class=653531023-29062005><FONT face=Arial
size=2>
$pointObj_coord1->setXY($arPoints["longitude"],
$arPoints["latitude"]); </FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2><BR> // $map is returned
by ms_newMapObj()</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> //
$currObjUnit->get_unit_symbol retrieves the LAYER NAME attribute for the
layer indicated in the unit config(ie "point_mapping-red" in this
case)<BR> $layerObj_imageSymbol =
$map->getLayerByName($currObjUnit->get_unit_symbol());</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2><BR> $class_index =
0;</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2> // draw the
point</FONT></SPAN></DIV>
<DIV><SPAN
class=653531023-29062005> <FONT
face=Arial size=2>// $map is a MapObj, $image is the image object
returned by $map->draw</FONT><BR></SPAN><SPAN
class=653531023-29062005><FONT face=Arial
size=2>
$pointObj_coord1->draw($map, $layerObj_imageSymbol, $image, $class_index,
''); </FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial size=2>
}</FONT></SPAN></DIV>
<DIV><SPAN class=653531023-29062005><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>