Ticket #2750 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

setVisibility(false) not respected before layer is fully loaded

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.10 Release
Component: Layer.Google.v3 Version: 2.9
Keywords: Cc:
State: Complete

Description

When setVisibility(false) is called on a Google layer right after map instantiation, the layer has not finished the repositionMapElements method, which will set the visibility to true.

The attached patch fixes this issue. Tests still pass. Thanks for any review.

Attachments

openlayers-2750.patch Download (417 bytes) - added by ahocevar 3 years ago.

Change History

Changed 3 years ago by ahocevar

Changed 3 years ago by tschaub

  • state changed from Review to Commit

I wish I had left a comment on that line with my justification for passing true. I can't recall any more why things didn't work with this.visibility. In any case, the examples I checked work and I confirmed tests pass in FF. If the same is true for IE, then it either indicates that there was indeed no reason for calling with true or our examples/tests are lacking. I'll hope for the former. If the latter, then let's put in more tests when the issue surfaces again.

Please commit.

Changed 3 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10551]) Respect setVisibity(false) before layer is fully loaded. r=tschaub (closes #2750)

Note: See TracTickets for help on using tickets.