Grid: _previousCenter not reset on show

10 views
Skip to first unread message

Stefaan Van Mieghem

unread,
Apr 30, 2013, 4:15:36 AM4/30/13
to opensca...@googlegroups.com
Use case:

WMS layer not visible
pan or zoom
set layer visible
pan or zoom = layer is briefly (until reloaded) drawn at an offset equal to the previous center - current center.

The previous center being the one at the moment of initialization or when latest visible.


I have added an override on the visible setter in the Grid class to solve the problem:

        override public function set visible(value: Boolean): void {
            super.visible = value;
            if (value && this.map) {
                _previousCenter = this.map.center.clone();
            }
        }
Reply all
Reply to author
Forward
0 new messages