OpenLayers OpenLayers

Ticket #1077 (closed bug: duplicate)

Opened 1 year ago

Last modified 1 year ago

calling setResize() on non-visible leayrs breaks them (especially commercial ones)

Reported by: crschmidt Assigned to: euzuro
Priority: minor Milestone: 2.6 Release
Component: Layer.Google Version: 2.5
Keywords: Cc:
State:

Description

When map.updateSize() is called, it loops through and calls layer.updateSize() on each layer. However, for invisible commercial layers, updateSize() will update the size of the layer to '0,0' because that's what the browser reports as a size for non-visible layers, and then the next time someone switches to that layer, it will have a size of '0,0' which results in unpredictable behavior.

To reproduce, open baseLayers.html. Resize the window. Switch to Google. Attempt to drag. (Broken!) Resize window. Attempt to drag. (Fixed!)

The fix for this is probably to only call setSize if a layer is visible, and if a layer is size 0,0 on moveTo, fix it.

Change History

10/10/07 01:25:23 changed by crschmidt

  • status changed from new to closed.
  • resolution set to duplicate.

Dupe of #830