blank image

Terence Maru terence at WAIROADC.GOVT.NZ
Tue Sep 4 19:17:07 EDT 2007


Hi everyone, I have a problem generating an image from my postgis
database  I have attached my php script.  No errors are returned when
the script is run, just a blank image is returned.  Can anyone see whats
wrong with my script?  Cheers
 
bm
 
<php-script_start>
 
$map = ms_newMapObj("");
$map->setSize(600, 300);
$temp = $map->setExtent(-180, -90, 180, 90);
 
//define path where to creat image
$map->web->set("imagepath", "./data/");
$map->web->set("imageurl", "./data/");
$map->web->set("log", "./data/logfile.txt");
 
//crate parcel layer, associate it withthe map
$parcelLayer = ms_newLayerObj($map);
$parcelLayer->set("connectiontype", MS_POSTGIS);
$parcelLayer->set("name", "parcels layer");
 
$connector = "user=username dbname=test host=localhost";
$parcelLayer->set("connection", $connector);
 
$sql = "the_geom from parcels";
$parcelLayer->set("data", $sql);
 
$parcelLayer->set("status", MS_DEFAULT);
$parcelLayer->set("type", MS_LAYER_POLYGON);

$parcelClass = ms_newClassObj($parcelLayer);
$parcelClass->set("name", "parcels class");
 
$parcelStyle = ms_newStyleObj($parcelClass);
$parcelStyle->color->setRGB( 250, 0, 0);
$parcelStyle->outlinecolor->setRGB( 255, 255, 255);
$parcelStyle->set("symbolname", "circle");
$parcelStyle->set("size", 10);

<php-script_end>

#####################################################################################
This e-mail message has been scanned for Viruses by McAfee and content has
been cleared by MailMarshal
#####################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070905/4e4c175e/attachment.html


More information about the mapserver-users mailing list