[mapserver-users] Can not draw single point

Helen Eskina heskina at ubitech.com
Wed Nov 25 17:39:19 EST 2009


Hello,



I try to draw single point on the map. My point is defined by lat/long
coordinates. The problem is that the point is always in the same place on
the map regardless of the lat/long defined.

Here is my code:

$map = ms_newMapObj($map_path."mymap.map");

$daLayer = ms_newLayerObj($map);

 $daLayer->set("type", MS_LAYER_POINT);

$daLayer->set("status", MS_ON);

 $class = ms_newClassObj($daLayer);

 $style = ms_newStyleObj($class);

 $style->color->setRGB(255,0,0);

 $style->set("symbolname", "circle");

 $style->set("size", 10);



$my_point = ms_newpointObj();



$my_point->setXY(42.19,-75.46);



$image=$map->draw();

$my_point->draw( $map, $ daLayer, $image, 0, "Temp Point" );



$image_url=$image->saveWebImage();



What is wrong with it? I will appreciate any help.



Thank you,

Helen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091125/262cf11c/attachment.html


More information about the mapserver-users mailing list