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

Overlapping background-patterns break rendering #1633

Closed
g12n opened this issue Oct 19, 2015 · 6 comments
Closed

Overlapping background-patterns break rendering #1633

g12n opened this issue Oct 19, 2015 · 6 comments
Labels

Comments

@g12n
Copy link

g12n commented Oct 19, 2015

The rendering of multiple layers with background patterns break the rendering of these layers:

image

You find the source of this sample here: https://github.com/g12n/cardboard-map-gl

The sample is hosted in github pages and can be accessed here:
http://g12n.github.io/cardboard-map-gl/

I added a debug version without patterns in the gh-pages branch:
http://g12n.github.io/cardboard-map-gl/debug.html

@mourner
Copy link
Member

mourner commented Oct 19, 2015

Wow, that looks bad. cc @ansis

@g12n
Copy link
Author

g12n commented Oct 19, 2015

I still suspect it's a mistake in my Sprite. It's my first shot at it.

@g12n
Copy link
Author

g12n commented Nov 19, 2015

Similar Problem in Mapbox Studio:

Using multiple pattern causes Problems in Chrome on Mac.

When you zoom into the map close enough so parks appear, the park pattern is replacing the water pattern. Once the swap has happened, the water won‘t return to mobile without a browser refresh.

pattern-bug

Test style created in Mapbox studio:

mapbox://styles/g12n/cih6bh7vl006lbpkrhtmbxjk3

Preview of the published style on Mapbox:

https://api.mapbox.com/styles/v1/g12n/cih6bh7vl006lbpkrhtmbxjk3.html?title=true&access_token=pk.eyJ1IjoiZzEybiIsImEiOiJpNnpzc2prIn0.0IvRMXsg6iYGFMrwPdpcbw#0/0/0/0

@ansis
Copy link
Contributor

ansis commented Jan 6, 2016

Thanks for the testcase @g12n

The problem was that the patterns did not fit in the sprite atlas. #141 is the underlying issue so I'll close this one. A temporary workaround would be to use smaller textures.

b016729 improves how the failure is handled by not drawing the affected layers and logging a warning to the console.

@ansis ansis closed this as completed Jan 6, 2016
@g12n
Copy link
Author

g12n commented Jan 7, 2016

Since this is Happening inside MapBox Studio as well, there should be a warning in the UI for Designers as well. Are you aware of an Issue in that Project?

I created a Test-Style with quite tiny patterns.
https://api.mapbox.com/styles/v1/g12n/cij4389bp001t9pm0us902vo5.html?title=true&access_token=pk.eyJ1IjoiZzEybiIsImEiOiJpNnpzc2prIn0.0IvRMXsg6iYGFMrwPdpcbw#9.56/37.9170/14.0625

It works, but the results are more than just unsatisfactory. :|

@lyzidiamond
Copy link
Contributor

Hi @g12n! We are working on the next release of Mapbox Studio right now, and we're thinking that the glyph atlas PR that will fix this ( #141) will be merged by that time, in which case there won't be an issue to warn about. Thanks for the heads up!

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

5 participants