Thanks for answering, Patricio, but that doesn't seem to resolve the problem. <br>I adapted the minor differences and yet the point is not displayed...<br><br><br><br><div><span class="gmail_quote">2006/5/5, Patricio Cifuentes Ithal <
<a href="mailto:pcifuentes@siigsa.cl">pcifuentes@siigsa.cl</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">
<div><font color="#000080" face="MS Sans Serif" size="2">Hi all....</font></div>
<div><font color="#000080" face="MS Sans Serif" size="2">here a
example....</font></div>
<div><font color="#000080" face="MS Sans Serif" size="2"></font> </div>
<div><font color="#000080" face="MS Sans Serif" size="2">php-mapscript.... PHP
code</font></div>
<div><font color="#000080" face="MS Sans Serif" size="2"></font> </div><font color="#000080" face="MS Sans Serif" size="2">
<div><br> /*ms_ResetErrorList();*/<br> /*LEYENDA DE
CREDITOS**************************************************/<br> $lay=ms_newLayerObj($map);<br>
$lay->set("name",
"CREDITOS");<br> $lay->set("status",MS_ON);<br> $lay->set("transparency","100");<br> $lay->set("transform",MS_TRUE);<br> $lay->set("type",MS_LAYER_ANNOTATION);
<br> <br> $clas=ms_newClassObj($lay);<br> $clas->label->set("type",MS_TRUETYPE);<br> $clas->label->set("font","fritqat-bold");<br> $clas->label->color->setRGB(0,130,150);
<br> $clas->label->outlinecolor->setRGB(255,255,255);<br> //$clas->label->backgroundcolor->setRGB(245,245,245);<br> //$clas->label->backgroundshadowcolor->setRGB(110,110,110);<br> $clas->label->set("size",7);
<br> $clas->label->set("position",MS_XY);<br> $clas->label->set("autoangle",MS_FALSE);<br> $clas->label->set("buffer",0);<br> $clas->label->set("antialias",MS_TRUE);
<br> $clas->label->set("partials",MS_TRUE);<br> $clas->label->set("force",MS_TRUE);<br> $clas->label->set("wrap",1);<br> </div>
<div>//transfor the pixel to geografics
pont<br> $p=pixelToGeo($map,5,$map->height -
5);<br> $pt=ms_newLineObj();<br> $pt->addXY($p->x,$p->y);</div>
<div>///or replace for coord... geografics
($pt->addXY($p->x,$p->y);)</div><div style="direction: ltr;"><span class="q"><br> <br> $shp =
ms_newShapeObj(MS_SHAPE_POINT);<br></span></div><div style="direction: ltr;"> $shp->set("text",
GV_COPY);<br>
$shp->add($pt);<br> <br> $lay->addFeature($shp);</div></font>
<div><font color="#000080" face="MS Sans Serif" size="2"></font> </div>
<div><font color="#000080" face="MS Sans Serif" size="2"></font> </div>
<div>-- </div>
<div> </div>
<div>Patricio Cifuentes Ithal<br>Ingeniero en Informática</div>
<div> </div>
<div>Informática<br>SIIGSA<br>(56-2) 204 60 22</div></div><div style="direction: ltr;"><span class="e" id="q_10b05b8a73dc52f5_3">
<blockquote style="border-left: 2px solid rgb(0, 0, 128); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="dark.peony@GMAIL.COM" href="mailto:dark.peony@GMAIL.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">d c</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="MAPSERVER-USERS@lists.umn.edu" href="mailto:MAPSERVER-USERS@lists.umn.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
MAPSERVER-USERS@lists.umn.edu</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Friday, May 05, 2006 1:57 PM
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [UMN_MAPSERVER-USERS] drawing a
point in MapScript</div>
<div><br></div>Hi,<br><br>I'm having a problem with rendering a point with
PHP Mapscript.<br>I'm wondering what I'm doing wrong.
I'm trying to simulate the <br>following Mapfile code (which works
well in Mapfile mode):<br><br>LAYER <br> TYPE POINT
<br> STATUS DEFAULT <br> FEATURE
<br> POINTS <br>
-64.4333333 -64.7833333
<br> END <br>
TEXT "HELLO WORLD" <br> END
<br> CLASS <br> COLOR
255 0 0 <br> SYMBOL 'cross'
<br> LABEL <br>
TYPE bitmap <br>
END <br> END <br>
TOLERANCE 5 <br> PROJECTION <br> "proj=latlong"
<br> "datum=WGS84" <br> END <br>END
<br><br><br>/********* PHP CODE ***********/<br><br>$map =
ms_newMapObj("Ant.map");<br> <br> $layer =
ms_newLayerObj($map);<br> $layer->name = 'point';<br>
$layer->type = MS_LAYER_POINT;<br> $layer->status = MS_DEFAULT;
<br> $layer->setProjection("proj=latlong,datum=WGS84");<br><br>
$pt = ms_newPointObj();<br>
$pt->setXY(-64.4333333,-64.7833333);<br> $ln =
ms_newLineObj();<br> $ln->add($pt);<br> <br> $shp =
ms_newShapeObj(MS_SHAPE_POINT); <br> $shp->text = 'HELLO
WORLD';<br> $shp->add($ln);<br> <br>
$layer->addFeature($shp);<br><br><br> $class1 =
ms_newClassObj($layer); <br> $class1->name =
'pointclass';<br> $class1->label->type = MS_BITMAP; <br>
$class1->label->color->setRGB(255,0,0);<br>
$class1->label->set('position',MS_AUTO);<br> $class1->status =
MS_ON;<br> $class1->settext = 'HELLO WORLD';<br> <br>
<br> $style = ms_newStyleObj($class1); <br> $style->symbolname
= 'cross';<br> $style->color->setRGB(255,0,0); <br>
$style->size = 10;<br>
$style->outlinecolor->setRGB(255,255,255);<br>
<br> <br> $image=$map->draw();<br>
<br> $image->saveImage('C:/ms4w/Apache/htdocs/tmp/'.$image_name);
<br><br>I'm followig (except for the projection bit) the code proposed
in<br>Beginning Mapserver and a tutorial I found on the Net. The code<br>seems
identical.<br><br>What am I doing wrong?
<br><br>Dan<br></blockquote>
</span></div></blockquote></div><br>