Ticket #2851 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

"this.layer.map is null" with OpenLayers.Strategy.Fixed

Reported by: fvanderbiest Owned by:
Priority: major Milestone: 2.11 Release
Component: Strategy.Fixed Version: SVN
Keywords: Cc:
State: Commit

Description

This happens when load() is called and the layer's visibility is switched off immediately after that. In this case, the merge callback is called and this.layer.map is undefined.

Attachments

ol_2851_A0.diff Download (2.0 KB) - added by fvanderbiest 3 years ago.
ol_2851_A1.diff Download (4.7 KB) - added by fvanderbiest 3 years ago.
Test added
ol_2851_A2.diff Download (4.8 KB) - added by erilem 3 years ago.

Change History

Changed 3 years ago by fvanderbiest

Changed 3 years ago by fvanderbiest

Please replace "the layer's visibility is switched off" by "the layer has been removed from the map object" in the above description.

Changed 3 years ago by fvanderbiest

Test added

Changed 3 years ago by erilem

ol_2851_A2.diff Download includes a test to verify that the load method correctly binds the protocol read callback.

We already have a test to verify that a reprojection is performed when the map projection isn't equal to the layer projection, so I think we're good enough in terms of coverage.

Tests pass in FF3 and IE7.

François, please tell me if you agree with this new patch, and I'll commit it.

Thanks,

Changed 3 years ago by erilem

Changed 3 years ago by fvanderbiest

This is excellent. Thanks Eric. Please commit.

Changed 3 years ago by erilem

  • state changed from Review to Commit

Changed 3 years ago by erilem

  • status changed from new to closed
  • resolution set to fixed

Fixed with [10791].

Note: See TracTickets for help on using tickets.