[OpenLayers-Users] Layer name with spaces

Christopher Schmidt crschmidt at metacarta.com
Wed Jan 10 08:20:29 EST 2007


On Wed, Jan 10, 2007 at 12:57:47PM +0100, Aitor Calero Garcia wrote:
> Are there any problem adding layers with spaces in its name, like "my wms layer", or with strings length? I know this is not good but I have to deal with those names. Complete example:
> 
>  
> 
> new OpenLayers.Layer.WMS("Autov?a en Servicio",
> 
>                   servidorGeomedia,
> 
>                   {layers: "Attribute Query of DESASIGI.WECA_SIGI_V_CARRETERAS,Attribute Query of DESASIGI.WECA_SIGI_V_CARRETERAS1,Attribute Query of DESASIGI.WECA_SIGI_V_CARRETERAS11,Attribute Query of DESASIGI.WECA_SIGI_V_CARRETERAS7",
> 
>                   transparent: "true",
> 
>                   format: "image/png"},
> 
>                   {isBaseLayer: false})
> 

This is probably less of a problem in OpenLayers 2.3, where we've added
URL encoding to the OpenLayers code. Before that, we would have depended
on the browser to do the same thing, and I don't think all browsers
would have worked with requests like this.

So, my suggestion is to try with OpenLayers 2.2, if it doesn't work, try
with 2.3-rc1, with the knowledge that it has some significant bugs with
controls in IE that w'ere currently working on pulling into an RC2, and
see how it looks. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list