Hi pietro,<br><br>sorry i had a problem in adding the  label layer over the kerala map layer....  unknowingly i asked the previous doubt...  now i need to add this second layer over the first one....  am getting the following error....<br>
<br><b>Warning</b>:  [MapServer Error]: msGetLabelSize(): Requested font (arial-bold) not found.
 in <b>/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php</b> on line <b>8</b><br>
<br>
<b>Warning</b>: [MapServer Error]: msSearchDiskTree(): Unable to open
spatial index for
/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/data/parl_04.qix.
In most cases you can safely ignore this message, otherwise check file
names and permissions. in <b>/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php</b> on line <b>8</b><br>
<br>
<b>Fatal error</b>:  Call to a member function saveWebImage() on a non-object in <b>/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php</b> on line <b>9<br><br></b>The follwing is my  PHP code...<br>
<br> &lt;?php<br> <br> dl(&#39;<a href="http://php_mapscript_5.2.1.so" target="_top" rel="nofollow">php_mapscript_5.2.1.so</a>&#39;);<br> <br> $map = ms_newMapObj(&quot;/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.map&quot;);<br>
 $layer=$map-&gt;getLayerByName(&quot;kerala&quot;,&quot;states_label&quot;);<br> $layer-&gt;set(&#39;status&#39;,MS_ON);<br> $image=$map-&gt;draw();<br> $image_url=$image-&gt;saveWebImage();<br><br> ?&gt;<br><br> &lt;HTML&gt;<br>
    &lt;HEAD&gt;<br>       &lt;TITLE&gt;Example 1: Displaying a map&lt;/TITLE&gt;<br> &lt;/HEAD&gt;<br> &lt;BODY&gt;<br> &lt;IMG SRC=&lt;?php echo $image_url; ?&gt; &gt;<br> &lt;/BODY&gt;<br> &lt;/HTML&gt;<br><b><br></b>i guess the problem is in label layer....  please help me out...<br>
<br>many thanks,<br>zizu<b><br><br><br></b><br><div class="gmail_quote">On Tue, May 5, 2009 at 7:10 PM, kapil manoj <span dir="ltr">&lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2795451&i=0" target="_top" rel="nofollow">manojkapil06@...</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi pietro,<br><br>could you please tell me how to add the layers with the following code...<div>

<br><br>  $layer = $map-&gt;getLayerByName(&#39;kerala&#39;)<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
;
<br>    $layer-&gt;set(&#39;status&#39;, MS_ON);
<br>    $image=$map-&gt;draw();
<br>    $image_url=$image-&gt;saveWebImage();
</blockquote></div><div><br>many thanks,<br>zizu <br></div><div><div></div><div><br><br><div class="gmail_quote">On Tue, May 5, 2009 at 7:01 PM, kapil manoj <span dir="ltr">&lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2795451&i=1" target="_top" rel="nofollow">manojkapil06@...</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi pietro,<br><br>Thank you so much...  now its works fine......<div><div></div><div>
<br><br><div class="gmail_quote">On Tue, May 5, 2009 at 6:07 PM, Pietro Giannini (via Nabble) <span dir="ltr">&lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2795451&i=2" target="_top" rel="nofollow">ml-user%2B94644-1894679202@...</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Zizu,
<br>STATUS OFF on all the layers of your map.
<br>To turn on:
<br>    $layer = $map-&gt;getLayerByName(&#39;kerala&#39;);
<br>    $layer-&gt;set(&#39;status&#39;, MS_ON);
<br>    $image=$map-&gt;draw();
<br>    $image_url=$image-&gt;saveWebImage();
<br><br>bye
<br>...................pg
<br><br><br>________________________________________
<br>Da: <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=0" rel="nofollow" target="_blank">mapserver-users-bounces@...</a> [<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=1" rel="nofollow" target="_blank">mapserver-users-bounces@...</a>] per conto di zizu [<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=2" rel="nofollow" target="_blank">manojkapil06@...</a>]
<br>Inviato: martedì 5 maggio 2009 12.59
<br>A: <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=3" rel="nofollow" target="_blank">mapserver-users@...</a>
<br>Oggetto: [mapserver-users] PHP Mapscript - Displaying only image colour except the existing layers
<br><br>Dear users,
<br><br>I am using FGS-Mapserver, its a stand alone environment on fedora 9. i have
<br>successfully play mapserver through cgi, there is absolutely no problem with
<br>that. Now am trying to play PHP-Mapscript , example given in the tutorial.
<br>The problem am encountering right now is when i run the php file through
<br>browser
<br><br><a href="http://localhost:8080/mapfiles/sampletest/htdocs/test.php" rel="nofollow" target="_blank">http://localhost:8080/mapfiles/sampletest/htdocs/test.php</a><br><br><br>Luckily the image colour of the map is displaying but the layers of the map
<br>is not displaying...  herewith am attaching the screen shot of that page....
<br>am also attaching both the map file and php file for your view.....
<br><br>what could be a problem.....   please help me out..
<br><br>tips will be appreciated....
<br><a href="http://n2.nabble.com/file/n2792269/Screenshot.png" rel="nofollow" target="_blank">http://n2.nabble.com/file/n2792269/Screenshot.png</a> Screenshot.png
<br><br><a href="http://n2.nabble.com/file/n2792269/test.map" rel="nofollow" target="_blank">http://n2.nabble.com/file/n2792269/test.map</a> test.map
<br><br><a href="http://n2.nabble.com/file/n2792269/test.php" rel="nofollow" target="_blank">http://n2.nabble.com/file/n2792269/test.php</a> test.php
<br><br>many thanks,
<br>zizu
<br><br><br>--
<br>View this message in context: <a href="http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2792269.html" rel="nofollow" target="_blank">http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2792269.html</a><br>



Sent from the Mapserver - User mailing list archive at Nabble.com.
<br><br>_______________________________________________
<br>mapserver-users mailing list
<br><a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=4" rel="nofollow" target="_blank">mapserver-users@...</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="nofollow" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>_______________________________________________
<br>mapserver-users mailing list
<br><a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=2793318&amp;i=5" rel="nofollow" target="_blank">mapserver-users@...</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="nofollow" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>

</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>

<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2795451.html">Re: [mapserver-users] R: PHP Mapscript - Displaying only image colour  except the existing layers</a><br>
Sent from the <a href="http://n2.nabble.com/Mapserver---User-f1969211.html">Mapserver - User mailing list archive</a> at Nabble.com.<br>