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>