[OpenLayers-Users] Strange bug (?) in OpenLayers 2.4rc3 vs 2.2

Nick Whitelegg nick at hogweed.org
Tue May 8 15:51:36 EDT 2007


Hello everyone,

I'm getting a strange effect if I use a Mercator projection WMS server with a 
bounding box which can take negative values in 2.4rc3 or the SVN version, 
which I didn't get in 2.2.

Looking at the URL constructed to get the tiles, it appears to be URL-encoding 
the commas which messes up the bbox.

i.e. the URL I get for the tiles in 2.4-rc3 is something like:

http://www.free-map.org.uk/cgi-bin/render?BBOX=-80000%2C6595000%2C-75000%2C6600000
&WIDTH=500&HEIGHT=500

rather than in 2.2:

http://www.free-map.org.uk/cgi-bin/render?BBOX=-80000,6595000,-75000,6600000
&WIDTH=500&HEIGHT=500

It doesn't seem to happen if I use the OSGB projection which uses all positive 
values.

The code I use to construct the Map and layer is:

                map = new OpenLayers.Map('map',
                { maxExtent: new OpenLayers.Bounds
                    (-700000,6500000,200000,8100000),
                resolutions: [10],
                tileSize: new OpenLayers.Size(500,500),
                      units: 'meters' }
                        );

                base = new OpenLayers.Layer.WMS( "Freemap/Mapnik",
                        "http://www.free-map.org.uk/cgi-bin/render",
                            {buffer:1} );

Is this a bug or am I doing something wrong?

Thanks,
Nick



More information about the Users mailing list