php_mapscript - showing polygon and point/annotation layers

Mike Reilly mikereilly2 at GMAIL.COM
Wed Aug 24 15:53:13 PDT 2005


Robert and list:

I think I've got this worked out. My original cgi-mapserver application used 
a hack to get both point and polygon data able to be filtered based on some 
extra data in their respective dbf files - namely site usage (USE1). As a 
result I had 3 layers with the same name as each other. While the cgi 
handled this fine, it appears that php is less forgiving. I started a .map 
file over again for my php application and have renamed the layers and 
everything seems to be much happier now.

Next major task on my list - create an interface to allow the creation of 
polygons to add to polygon shapefiles - whee!

Thanks again for your help.

Regards,
Mike

On 8/24/05, robert fritz <robert-fritz at web.de> wrote:
> 
> Hi Mike,
> 
> If you want to draw some specific layers you can try this ::
> 
> 1) Switch off all Layers
> function setAllLayerOff($MapObject)
> { 
> $layers = $MapObject->getAllLayerNames(); 
> for($a=0;$a<count($layers);$a++)
> {
> $tmp = $MapObject->getlayerbyname($layers[$a]);
> $tmp->set("status",0);
> }
> }
> 
> 2) Switch on the layers you want to see in your map
> 
> ....
> $layer_on = $MapObject->getlayerbyname($layername);
> $layer_on->set("status",1); 
> 
> ......
> 
> 
> 3) Draw the map and save it
> 
> $objImage=$objMap->draw();
> $image_url=$objImage->saveWebImage(); 
> 
> 
> Mit der Gruppen-SMS von WEB.DE <http://WEB.DE> FreeMail können Sie eine 
> SMS an alle 
> Freunde gleichzeitig schicken: *http://freemail.web.de/features/?mc=021179
> * <http://freemail.web.de/features/?mc=021179> 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050824/c49fb396/attachment.htm>


More information about the MapServer-users mailing list