<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
I am trying to develop a map application with php mapscript and postgis.&nbsp; I can map my postgis data in a standard map file and the php mapscript generates a map file on a shape file.&nbsp; However, when I try to generate a php mapscript map I get a blank screen.&nbsp; There are no error messages but the data doesn't display.&nbsp; My php file is shown below.&nbsp; Does anyone have any suggestions?<br><br>Thanks,<br>Sam<br><br>&lt;html&gt;<br>&lt;head&gt;&lt;/head&gt;<br>&lt;body&gt;<br>&lt;?PHP<br>// ex5_map_points.php<br><br><br>// Load MapScript extension<br>if (!extension_loaded("MapScript"))<br>&nbsp; dl('php_mapscript.'.PHP_SHLIB_SUFFIX);<br><br>// Create a map object. Provide empty string if not<br>// using an existing map file<br>$oMap = ms_newMapObj("");<br><br>// Set size of the output map image<br>$oMap-&gt;setSize(256,256);<br><br><br>$oMap-&gt;web-&gt;set(imagepath,"/ms4w/tmp/ms_tmp/");<br>$oMap-&gt;web-&gt;set(imageurl,"/ms_tmp/");<br><br>// Set the geographic extents of the map.<br>$oMap-&gt;setExtent(1543790,718550,1560340,750790);<br><br><br>// Create a data layer and associate it with the map.<br>// This is the raster layer showing some cloud imagery<br>$oLayerRoads = ms_newLayerObj($oMap);<br>$oLayerRoads-&gt;set( "name", "roads");<br>$oLayerRoads-&gt;set( "type", MS_LAYER_LINE);<br>$oLayerRoads-&gt;set( "status", MS_DEFAULT);<br>$oLayerRoads-&gt;set( "connectiontype", "postgis");<br>$oLayerRoads-&gt;set( "connection", "dbname=gisdb user=user password=password host=localhost port=5432");<br>$oLayerRoads-&gt;set( "data", "the_geom from (select * from roads) as foo using unique gid using SRID=2242");<br><br><br>// Create a class object to set feature drawing styles.<br>$oMapClass = ms_newClassObj($oLayerRoads);<br><br><br>// Create a style object defining how to draw features<br>$oRoadsStyle = ms_newStyleObj($oMapClass);<br>$oRoadsStyle-&gt;color-&gt;setRGB(255,0,0);<br><br><br><br>// Create label settings for drawing text labels<br>$oMapClass-&gt;label-&gt;set( "position", MS_AUTO);<br>$oMapClass-&gt;label-&gt;color-&gt;setRGB(250,0,0);<br>$oMapClass-&gt;label-&gt;outlinecolor-&gt;setRGB(255,255,255);<br><br><br><br>// Render the map into an image object<br>$oMapImage = $oMap-&gt;draw();<br><br>$image_url=$oMapImage-&gt;saveWebImage();<br><br><br>?&gt;<br>&lt;img src=&lt;?php echo $image_url; ?&gt; alt="Map" /&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br /><hr />Need to know now? Get instant answers with Windows Live Messenger. <a href='http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_062008' target='_new'>IM on your terms.</a></body>
</html>