Mike Trinder
Mike Trinder
I should add, this behaviour is new to v2.12
Aha - found why .draw() gets called twice: in Map.js, setBaseLayer() first calls this.baseLayer.setVisiblity(true) at line 1233 (which calls redraw() on the Layer) then it later calls this.setCenter(center, newZoom, false,...
OK - I can see how the TileManager might help by making sure draw() is only called once when shifting baseLayers but it doesn't address the logic error in Tile/Image.js...
Sorry - been on other projects. Yes. Using a closure is the only correct solution to async stuff. And your solution tries to ensure both the reload and load events...