[Mapserver-users] PHP Mapscript processtemplate()

DEAN Jeremy E Jeremy.E.DEAN at Co.Benton.OR.US
Fri Jul 2 16:03:44 PDT 2004


I am trying to get the PHP MapScript method of char processtemplate(array
params, boolean generateimages) to work and have been stumped repeatedly.  I
have used the processlegendtemplate( ) method with no problems and am
confused by what I must be doing wrong.

Using the below code I get no errors, images are created, but $output is
empty as it is with everything I have tried.

Does anyone have any examples of how they have used this?  My most basic
attempt so far has been this:

PHP code:
$map = ms_newMapObj("C:\\WebPrograms\\GIS\\v09_10\\examples\\demo.map");

$output = $map->processtemplate(null, MS_TRUE);

echo(" $output ");

$error = ms_GetErrorObj();
while($error && $error->code != MS_NOERR)
{
	printf("Error in %s: %s<br>\n", $error->routine, $error->message);

	$error = $error->next();
}

MAP file:
Web
  Empty "http://10.10.254.3/GIS/v09_10/Source/Empty.htm"
  Template Main.htm
  ImagePath "C:\WebPrograms\GIS\v09_10\Temp\"
  ImageURL "../Temp/"
  MetaData
    MapName "TEST"
  End  
End

Thanks in advance,
Jeremy Dean
Benton County IRM
Programmer/Analyst
[541] 766-6610




More information about the MapServer-users mailing list