[mapserver-users] R: PHP Mapscript - Displaying only image colour except the existing layers

zizu manojkapil06 at gmail.com
Tue May 5 09:59:33 EDT 2009


Hi pietro,

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....

*Warning*: [MapServer Error]: msGetLabelSize(): Requested font (arial-bold)
not found. in *
/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php* on
line *8*

*Warning*: [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 *
/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php* on
line *8*

*Fatal error*: Call to a member function saveWebImage() on a non-object in *
/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.php* on
line *9

*The follwing is my  PHP code...

 <?php

 dl('php_mapscript_5.2.1.so');

 $map =
ms_newMapObj("/home/kapil/FGS-MAPSERVER/www/htdocs/mapfiles/sampletest/htdocs/test.map");
 $layer=$map->getLayerByName("kerala","states_label");
 $layer->set('status',MS_ON);
 $image=$map->draw();
 $image_url=$image->saveWebImage();

 ?>

 <HTML>
    <HEAD>
       <TITLE>Example 1: Displaying a map</TITLE>
 </HEAD>
 <BODY>
 <IMG SRC=<?php echo $image_url; ?> >
 </BODY>
 </HTML>
*
*i guess the problem is in label layer....  please help me out...

many thanks,
zizu*


*
On Tue, May 5, 2009 at 7:10 PM, kapil manoj <manojkapil06 at gmail.com> wrote:

> Hi pietro,
>
> could you please tell me how to add the layers with the following code...
>
>   $layer = $map->getLayerByName('kerala')
>>
>> ;
>>     $layer->set('status', MS_ON);
>>     $image=$map->draw();
>>     $image_url=$image->saveWebImage();
>
>
> many thanks,
> zizu
>
>
> On Tue, May 5, 2009 at 7:01 PM, kapil manoj <manojkapil06 at gmail.com>wrote:
>
>> Hi pietro,
>>
>> Thank you so much...  now its works fine......
>>
>>
>> On Tue, May 5, 2009 at 6:07 PM, Pietro Giannini (via Nabble) <
>> ml-user+94644-1894679202 at n2.nabble.com<ml-user%2B94644-1894679202 at n2.nabble.com>
>> > wrote:
>>
>>> Hi Zizu,
>>> STATUS OFF on all the layers of your map.
>>> To turn on:
>>>     $layer = $map->getLayerByName('kerala');
>>>     $layer->set('status', MS_ON);
>>>     $image=$map->draw();
>>>     $image_url=$image->saveWebImage();
>>>
>>> bye
>>> ...................pg
>>>
>>>
>>> ________________________________________
>>> Da: mapserver-users-bounces at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=0>[
>>> mapserver-users-bounces at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=1>]
>>> per conto di zizu [manojkapil06 at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=2>]
>>>
>>> Inviato: martedì 5 maggio 2009 12.59
>>> A: mapserver-users at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=3>
>>> Oggetto: [mapserver-users] PHP Mapscript - Displaying only image colour
>>> except the existing layers
>>>
>>> Dear users,
>>>
>>> I am using FGS-Mapserver, its a stand alone environment on fedora 9. i
>>> have
>>> successfully play mapserver through cgi, there is absolutely no problem
>>> with
>>> that. Now am trying to play PHP-Mapscript , example given in the
>>> tutorial.
>>> The problem am encountering right now is when i run the php file through
>>> browser
>>>
>>> http://localhost:8080/mapfiles/sampletest/htdocs/test.php
>>>
>>>
>>> Luckily the image colour of the map is displaying but the layers of the
>>> map
>>> is not displaying...  herewith am attaching the screen shot of that
>>> page....
>>> am also attaching both the map file and php file for your view.....
>>>
>>> what could be a problem.....   please help me out..
>>>
>>> tips will be appreciated....
>>> http://n2.nabble.com/file/n2792269/Screenshot.png Screenshot.png
>>>
>>> http://n2.nabble.com/file/n2792269/test.map test.map
>>>
>>> http://n2.nabble.com/file/n2792269/test.php test.php
>>>
>>> many thanks,
>>> zizu
>>>
>>>
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2792269.html
>>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=4>
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at ...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2793318&i=5>
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>> ------------------------------
>>>  This email is a reply to your post @
>>> http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2793318.html
>>> You can reply by email or by visting the link above.
>>>
>>>
>>
>

-- 
View this message in context: http://n2.nabble.com/PHP-Mapscript---Displaying-only-image-colour-except-the-existing-layers-tp2792269p2795451.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090505/09901c00/attachment-0001.html


More information about the mapserver-users mailing list