There is no GetCapabilities request involved here, the application isn't using 
WMS GetCapabilities at all.

What happens is that the layers param is split on "," and the strings are taken 
from there.

If possible use separate WMS layers (so you can define the title on the 
OpenLayers Layer object) and group them together in the tree instead of using a 
LayerParamLoader.

This might not be a trivial exercise though, for some inspiration you could 
look here:

https://github.com/boundlessgeo/gxp/blob/master/src/script/plugins/LayerTree.js

Best regards,
Bart

Bart van den Eijnden
Front-end Developer | Boundless
@boundlessgeo

On Oct 3, 2013, at 12:07 AM, Raffaele Morelli <[email protected]> 
wrote:

> Here it is a test url
> http://cen.isprambiente.it/~rmorelli/ol/
> 
> WMS url is the same, two layers are being fetched: "linee" and "sostegni_elf".
> 
> As you can see "sostegni_elf" does not use wms_title in the GetCapabilities 
> response (should be "Sostegni ELF").
> 
> BTW "Linee" an "linee" both works, so case insensitive.
> 
> Am I missing something? Code is taken from GeoExt examples page (mostly layer 
> tree). Must say that I am quite new to GeoExt.
> 
> Regards
> /raffaele
> 
> 
> 
> 2013/10/2 Bart van den Eijnden <[email protected]>
> Can you show us some code or more details on what you use?
> 
> Are you using a WMSCapabilitiesStore? Since it should use the title and 
> fallback to the name:
> 
>                     values.layer = new OpenLayers.Layer.WMS(
>                         layer.title || layer.name, url, params, options
>                     );
> 
> Best regards,
> Bart
> 
> Bart van den Eijnden
> Front-end Developer | Boundless
> @boundlessgeo
> 
> On Oct 2, 2013, at 4:31 AM, Raffaele Morelli <[email protected]> 
> wrote:
> 
>> Hi,
>> 
>> I am developing a web app with GeoExt and using a layer tree.
>> 
>> Layers are fetched from a WMS server (mapserver) but layers names in the 
>> tree are used instead of wms_title parameter in the mapfile.
>> 
>> Problem is that layers names are somewhat "ugly" due to mapserver 
>> recommendation that [quote] a layer name should not contain spaces, special 
>> characters and not begin with a number [/quote].
>> 
>> I know I can override mapserver recommendation but my question is: why 
>> GeoExt does not use wms_title parameter in the mapfile?
>> 
>> Regards
>> /raffaele
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
> 
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to