Skip to content

[BUG] GeoJS polygon layer must draw twice #365

@subdavis

Description

@subdavis

Two calls to draw() are necessary for the polygonLayer to get it to pick up style functions applied to the layer. This shouldn't happen, and we aren't sure what caused it. The bug was discovered on #355 where an extra reactivity loop update was making the second call, hiding the bug. That change eliminated the extra loop, causing this to appear.

It's always the second render loop. If you disable the default updateLayers in LayerManager it won't draw anything in the beginning, on first update only text, then the second update it will do rects. So that eliminates any weird timing issues with loading the data.

The Polygon webGL render has RGB data for the color of lines. Looks like I can grab out of the renderer in there a color that corresponds with the type color.

I've traced the issue to createStyle -- basically when the app loads, the rectangles don't get drawn. If you touch basically anything, they appear. checkbox, visibility controls, even clicking the right region of the screen to trigger selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions