OpenLayers OpenLayers

Ticket #387 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Problem with FireFox Tabs

Reported by: euzuro Assigned to:
Priority: blocker Milestone: 2.2 Release
Component: Map Version: 2.2 RC2
Keywords: Cc:
State:

Description (Last modified by euzuro)

From Bart's email to the list:

the following use case with 2.2RC2:

* open up an OpenLayers application with a few untiled WMS layers (1 base layer, a few overlays) in Firefox * open up a new tab in Firefox

will cause a displacement between the baselayer and the overlays.

Situation before adding a tab (screendump): http://osgis.nl/download/openlayers_firefox_no_tab.png

Situation after adding a tab (screendump): http://osgis.nl/download/openlayers_firefox_add_a_tab.png

Example HTML code to reproduce:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD><!-- javascript include OpenLayers.js -->
<script language="JavaScript"
src="http://localhost/chameleon//common/openlayers/OpenLayers.js"
type="text/javascript"></script>
<SCRIPT Language="JavaScript"  type="text/javascript">

var map;
       function mapinit(){
           map = new OpenLayers.Map( $('map'), { 'projection':
'EPSG:4326', 'units':'degrees', 'maxExtent': new OpenLayers.Bounds(-180,
-90, 180, 90) , 'maxResolution':'auto'});            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldGen",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldGen', 'format':'image/png', 'transparent':'true'},
{'ratio':1, isBaseLayer: true} );

           map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "World Political",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldPolitical', 'format':'image/png', 'transparent':'true'},
{'ratio':1, isBaseLayer: false} );

           map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldGen_Outline",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldGen_Outline', 'format':'image/png',
'transparent':'true'}, {'ratio':1, isBaseLayer: false} );

           map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldRoads",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldRoads', 'format':'image/png', 'transparent':'true'},
{'ratio':1, isBaseLayer: false} );

           map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldPlaces",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldPlaces', 'format':'image/png', 'transparent':'true'},
{'ratio':1, isBaseLayer: false} );

           map.addLayers([layer]);            var layer = new
OpenLayers.Layer.WMS.Untiled( "WorldPOI",
               "http://www2.dmsolutions.ca/cgi-bin/mswms_world?",
{layers: 'WorldPOI', 'format':'image/png', 'transparent':'true'},
{'ratio':1, isBaseLayer: false} );

           map.addLayers([layer]);            map.addControl(new
OpenLayers.Control.LayerSwitcher());
           //map.addControl(new OpenLayers.Control.OverviewMap());

           map.zoomToMaxExtent();
       }

function CWC2OnLoadFunction()
{

mapinit();

}
</SCRIPT>

<title>Chameleon Sample - OGC Widgets</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<body onload="CWC2OnLoadFunction();">
<form>
<div id="map"></div>
</form>
</body>
</html>

Attachments

untiled.patch (0.7 kB) - added by euzuro on 11/08/06 11:40:50.
this time just the fix, not the example

Change History

11/03/06 09:09:44 changed by euzuro

  • description changed.

11/08/06 11:18:17 changed by crschmidt

  • keywords set to review.

So, we have a couple tickets in 2.3 that address this, but temporarily, we can fix this functionality by creating new tiles when the map size changes with an additional test, as done in the patch attached.

11/08/06 11:40:50 changed by euzuro

  • attachment untiled.patch added.

this time just the fix, not the example

11/08/06 11:44:08 changed by euzuro

  • keywords changed from review to pullup.
  • status changed from new to closed.
  • resolution set to fixed.

fixed well enough for 2.2 with r1779

11/08/06 14:09:43 changed by euzuro

  • keywords deleted.

pulled up to 2.2 branch with r1785