geojs
geojs copied to clipboard
Polygon border draw order
When drawing a polygon on top of another polygon with a border, the draw order is sometimes not consistent between the border and the interior. I assume this is caused by internally creating a line feature to draw the border of a polygon. In the attached image, all colors are fully opaque.
Yes -- we draw all of the interiors, and then all of the borders. I'll have to think about an efficient solution to this.
We should be able to use a z-value during the gl rendering to fix this.
David if it is gl backend one efficient solution would be to disable depth write so whatever is drawn last will win.
That is the current problem -- we draw all of the interiors, then we draw all of the borders. The last drawn wins. In this case, it will still be more efficient to draw all of the interiors and then all of the borders, since the set up for each (especially borders) is complicated due to all of the possible options. If we map the z-values properly, it will add only a small rendering time penalty (and sometimes by not having to modify the drawing buffer, might actually speed things up), and fix the problem.