[mapserver-users] Can not draw single point
    Worth Lutz 
    wal3 at mindspring.com
       
    Fri Nov 27 05:12:16 PST 2009
    
    
  
Here is how I do it:
 
        $point = ms_newPointObj();
        $point->setXY(2119500,757263);
        $line = ms_newLineObj();
        $line->add($point);
        $shape = ms_newShapeObj(MS_SHAPE_POINT);
        $shape->add($line);
        $shape->set('text', 'new point');
        $newLayer->addFeature($shape);
 
 
 
  _____  
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Helen Eskina
Sent: Wednesday, November 25, 2009 5:39 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Can not draw single point
 
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/20091127/b0c8a0e8/attachment.htm>
    
    
More information about the MapServer-users
mailing list