[Mapserver-users] Problem Colouring Layers

Sam Choudry samuzzal at linux.net
Thu Apr 22 02:50:43 EDT 2004


Dear group,

        Thank yo very much for showing me the way to sove the 
problem regarding windows 2000 Server. Although it still
remains but I hope I will be able to solve it.

	This time I have another problem. I am trying to colour 
one of my layers using Php-Mapscript function using these code

<?php	.
	.
	$r = $_POST["R"];
	$g = $_POST["G"];
	$b = $_POST["B"];

	if($r != '' && $g != '' && $b != '')
	{
	 $coloured_layer = $map->getlayerbyname("nal-blks");
	 $coloured_layer->set("status", MS_ON);
	 $class = $coloured_layer->getClass(0);
	 $color = $map->addColor($r,$g,$b);
	 $class->set("color", $color);
	}
	.
	.
	$image=$map->draw();
	$image_url=$image->saveWebImage();
	.
	.  
?>
<html>
..
	R<INPUT TYPE=TEXT NAME="R" size = "3">
	G<INPUT TYPE=TEXT NAME="G" size = "3">
	B<INPUT TYPE=TEXT NAME="B" size = "3">
..
</html>

But the following error message is displayed as I try 
it in the IE.

Fatal error: Call to undefined function: addcolor() 
in c:\inetpub\wwwroot\color.php on line 24

What could be the possible reason? May I have some 
help from the group.

					Samuzzal

_____________________________________________________________
Linux.Net -->Open Source to everyone
Powered by Linare Corporation
http://www.linare.com/



More information about the mapserver-users mailing list