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

draw priority is unstable in gl js #1558

Closed
samanpwbb opened this issue Sep 25, 2015 · 11 comments · Fixed by #1774
Closed

draw priority is unstable in gl js #1558

samanpwbb opened this issue Sep 25, 2015 · 11 comments · Fixed by #1774
Labels

Comments

@samanpwbb
Copy link
Contributor

I wish I could find better examples of this problem, but:

  • Sometimes labels from one layer show up at the exact location on one refresh, and are gone on the next refresh.
  • Sometimes layers lower in the order seem to have draw priority above layers higher in the stack.
@jfirebaugh
Copy link
Contributor

Yeah, we're going to need examples for this to be actionable.

@samanpwbb
Copy link
Contributor Author

The stylesheets and the views are the same here:

step2
step1

I know this isn't much better. I'll work on isolating the problem.

@samanpwbb
Copy link
Contributor Author

Same map style, two different loads:
screen shot 2015-09-30 at 11 37 50 am
screen shot 2015-09-30 at 11 37 39 am

Could it have something to do with setStyle calls happening and changing up the draw priority.

@peterqliu
Copy link
Contributor

I've run into this often with Emerald, starting with v8. I can't discern a pattern, though. A page refresh usually fixes the problem.

@Phrogz
Copy link

Phrogz commented Sep 30, 2015

In case it's related, for me Emerald always fails to draw the ocean/rivers/continental borders, at all zoom levels:

emerald-nowater
Chrome Version 45.0.2454.101 m and Firefox v40.0.3
Windows 7x64
GeForce GTX 670 (Driver v355.82, released 2015-Aug-31)

I'm seeing the same results in Mapbox Studio beta when editing a style that is based off of Emerald as well.

I get the same results on Chrome and Firefox. I (and everyone in my office) previously had a different problem with background colors changing across tiles, that was also the same across Chrome and Firefox. Updating the graphics card drivers fixed that problem. Given this cross-browser consistency, I'm guessing it's a GL interaction with the driver.

@Phrogz
Copy link

Phrogz commented Oct 1, 2015

Not sure if you changed code deployed for Mapbox Studio in the last 24 hours, or if my own upgrade to Windows 7 SP1 fixed something internal, but Mapbox Studio no longer exhibits the problem I described above. (And I can't test on the mapbox-gl-styles URL any more, because you have now changed it to redirect to GitHub.)

@jfirebaugh
Copy link
Contributor

(And I can't test on the mapbox-gl-styles URL any more, because you have now changed it to redirect to GitHub.)

Sorry, I actually changed that in response to your last comment and meant to post back here: the styles that were displayed there weren't being kept up to date, and the page was using a bleeding-edge version of mapbox-gl-js. Together, these made it an unreliable way to show off the available styles. Mapbox Studio has a built-in style picker, and we'll have something similar in our documentation soon.

We haven't changed anything intentionally to fix the rendering issues described here, so I suspect they disappeared for you for other reasons.

@amyleew
Copy link

amyleew commented Nov 17, 2015

Removed previous comment. Layer order was wrong... higher layers take priority over lower layers for labels.

@amyleew
Copy link

amyleew commented Nov 17, 2015

Fixed ordering but still running into some inconsistency here with the layer order. Where place-label (lrg) should take priority over place-label (med) and place-label (sm)

image

image

@lucaswoj
Copy link
Contributor

I theorize this is a race condition having to do with labels that are too close to tile boundaries. Maybe #1727 will help.

screen shot 2015-11-17 at 10 19 37 am

@samanpwbb
Copy link
Contributor Author

@lucaswoj it's not just borders. I have a style with two symbol layers. Whichever I edit first and apply with a smartsetstyle gets draw priority. The end result is that the things you edit end up on top, and the things you haven't edited in a while drop to the bottom.

Here's a style that should demonstrate this: https://gist.github.com/samanpwbb/0119c53b427a85ce24ef

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

Successfully merging a pull request may close this issue.

6 participants