[Mapserver-users] pointObj->draw() not working!
Ken-ichi Ueda
kueda at wso.williams.edu
Fri Apr 9 00:39:13 PDT 2004
Hi list. Although my previous addPoint problem remains unanswered and
unsolved, I have yet another problem. For some reason phpMapScript's
pointObj->draw() isn't working either! I've put together what I think
is a pretty trivial test of the function, and it doesn't give any error
messages, but it also doesn't draw the point I want it to. I've
included my version info and the test script below. Please respond!
Even if it looks like it should work and you're clueless. I just want
a little feedback.
Thanks in advance!
MapServer Version
MapServer version 4.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF
INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE
PHP MapScript Version
($Revision: 1.177 $ $Date: 2003/07/30 19:01:31 $)
<?php
dl('php_mapscript.so');
// Default values and configuration
$map_path = "/Library/WebServer/Documents/maplab/projects/Naturalists/";
$map_file = "naturalists.map";
$map = ms_newMapObj($map_path.$map_file);
$my_point = ms_newpointObj();
$my_point->setXY(217,240);
//get layer object
$daLayer = $map->getLayerByName( "Points" );
$image = $map->draw();
$my_point->draw( $map, $daLayer, $image, 0, "Temp Point" );
$image_url=$image->saveWebImage();
?>
<html>
<head><title>point draw test</title>
</head>
<body>
<img SRC="<?php echo $image_url?>" align="left">
</body>
</html>
-Ken-ichi
More information about the MapServer-users
mailing list