I specified the raster file with "name" and "title" in Geoserver.
For example, I have these in Geoserver:
name, Title
AT:usa, "This is a map of USA"
Can I return the title ("This is a map of USA" ) as the layer name in Openlayers layer switcher when I call the WMS service for this layer by name? By default, it shows "usa" in the layer switcher.
Best Answer
I suppose you are creating your OpenLayers WMS layer as follows:
then the first parameter is the layer name that will be displayed in the layer switcher. Simply set it to whatever you like it to be.