[OpenLayers-Users] OpenLayers 2.2, Firefox 2.0,MapServer WMS

Christopher Schmidt crschmidt at metacarta.com
Wed Nov 15 18:58:05 EST 2006


On Wed, Nov 15, 2006 at 02:47:08PM -0800, Justin Fail wrote:
> 
> Hi All,
> I've recently starting testing with OpenLayers (ie. yesterday) and my test
> sites worked fine with version 2.1.
> I transferred to version 2.2 today and now my app does not work in Firefox
> 2.0. It works fine in IE 6.
> Anything that I'm doing wrong here, or could be doing better?

There's a couple things I'd mention.  

>     var wms = new OpenLayers.Layer.WMS.Untiled( "UCL WMS",
> "http://localhost/cgi-bin/mapserv_tracker.exe?service=WMS", {layers:
> 'Coastline',format:'gif',buffer:1,maxExtent:maxBounds,maxResolution:'auto'}
> );

You're adding 'buffer', maxExtent, etc. into the params of the layer
instead of the options. This should be: 

var wms = new OpenLayers.Layer.WMS.Untiled( "UCL WMS",
"http://localhost/cgi-bin/mapserv_tracker.exe?service=WMS", {layers:
'Coastline',format:'gif'},{buffer:1,maxExtent:maxBounds,maxResolution:'auto'}
);

Additionally, for untiled, buffer doesn't make any difference.

However, when I take your code and look at it in FF 1.5 and FF2.0 it
seems to work (other than not being able to generate an image). OL 2.2
does introduce some rather strict checking of the tile URL to ensure it
matches the tile that was asked for. If you are using a port 80 in your
URL, this might be your problem: http://localhost:80/ won't work,
because Firefox strips the :80 from the URL of the img.src after loading
the image. (Improving this behavior is on the chopping block for 2.3.)

Can you reproduce the failure with any of the examples in the
distribution?

If you need to get up and running, you can use
http://openlayers.org/api/2.1/OpenLayers.js while we work to resolve
your issues with 2.2.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list