Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layoutLayer ceases to be called when MapView is wrapped by another container #49

Open
jperedadnr opened this issue Jul 24, 2020 · 2 comments
Labels

Comments

@jperedadnr
Copy link
Contributor

A layer (PoiLayer) added to MapView gets synchronized with the underlying map (translation and zoom).
However, when the MapView is child of another container, at some point the layoutLayer call ceases and the PoiLayer is not synced for a while.

@jperedadnr
Copy link
Contributor Author

jperedadnr commented Jul 24, 2020

Possible fix in MapView:

protected void markDirty() {
        dirty = true;
        Parent p = this;
        while (p != null) {
            p.setNeedsLayout(true);
            p = p.getParent();
        }
    }

however Parent::setNeedsLayout is protected.

This works in any case:

protected void markDirty() {
        dirty = true;
        this.requestLayout();
    }

@ctipper
Copy link

ctipper commented Jun 6, 2022

I've run into this with a MapView not updating BaseMap whilst panning inside a container. I really don't understand what is going on, but something to do with layoutChildren not being called until a call to MapView.getLayoutBounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants