[mapserver-users] GetCapabilities for a specific layer, not the entire mapfile?

Armin Burger armin.burger at gmx.net
Thu Apr 17 13:52:40 EDT 2008


On 17/04/2008 14:20, Daniel Morissette wrote:
> Armin Burger wrote:
>>
>> [...] Or using the main map file and deleting all layers but the 
>> requested one with 'removeLayer()'. This does not work with PHP 
>> Mapscript since this method does not exist there.
> 
> The removeLayer() method does not exist in PHP MapScript, but you can 
> achieve the same result by using the DELETED status on the layers to 
> hide from the GetCapabilities:
> 
>   $layer->set("status", MS_DELETE);
> 
> Daniel

This never worked for me. The only effect I noticed so far when setting 
a layer's status to MS_DELETE was that it was not included in the map 
when I write it out to a file with $map->save().

But these layers are still listed in the getCapabilities response, they 
are still existing for the $map->getAllLayerNames() method and in the 
indexes of existing layers. In Python Mapscript the removeLayer function 
exists and works.

Armin


More information about the mapserver-users mailing list