[Mapserver-users] Does anyone success add point persistent to shape?

Dave McCann dmccann at progressivepartnering.com
Mon Jun 7 14:46:58 EDT 2004


We are looking for a similar function to write point/polygon data that a
user plots on a map. Have you been successful in finding the answer?

Anyone else out there know of an answer?

Thanks,

Dave

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of No dream more
Sent: Friday, June 04, 2004 12:05 AM
To: Mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Does anyone success add point persistent to
shape?


Dear list,

I am customizing the interface from mapserver workshop to implementing a
function to add point to map. But I got some problem:
- If I create a new layer then I open layer for adding a point. The error
always is "msSHPOpenFile(): No (NULL) filename provided".
    $newLyr = new_msLayerObj($mapObj);
    if($newLyr->open()==MS_SUCCESS){    ////// -> msSHPOpenFile(): No (NULL)
filename provided
    }

- I can add a point to existing layer but I can add only one point. This
point cannot be save to shape file.

     //$newLyr = new_msLayerObj($mapObj);
    $newLyr = $mapObj->getLayerByName("test_point");

    $newPoint = ms_newPointObj();
    $newPoint->setXY($x, $y);

    $newLine = ms_newLineObj();
    $newLine.add($newPoint);

    $newShp = ms_newShapeObj(MS_SHAPE_POINT);
    $newShp->add($newLine);

    $imgObj = $mapObj->draw();                     (If this call, the point
can draw)
    //$imgObj = $mapObj->prepareImage();        (If this call, I got only a
blank screen)

    $newLyr->draw($imgObj);
    $imgObj->saveImage("");

Does anyone success add point persistent to shape?

Thank.

Le Ngoc Lam

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users





More information about the mapserver-users mailing list