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

circle layers with invisible strokes don't render in 0.41.0 #5496

Closed
songololo opened this issue Oct 21, 2017 · 3 comments
Closed

circle layers with invisible strokes don't render in 0.41.0 #5496

songololo opened this issue Oct 21, 2017 · 3 comments

Comments

@songololo
Copy link

version 0.41 breaks setLayoutProperty, for example:

map.setLayoutProperty('mylayer', 'visibility', 'visible')

has no effect with v 0.41 whereas it works perfectly in v 0.40

@lbud
Copy link
Contributor

lbud commented Oct 23, 2017

Thanks for your report @Shongololo. Can you please create a minimal JSFiddle that reproduces the issue?

@songololo
Copy link
Author

songololo commented Oct 24, 2017

@lbud
Here is a JS fiddle:
https://jsfiddle.net/shongololo/rmxez25s/5/

The example is linked to a mapbox studio map style.

Note that if you change the jsfiddle external resource for mapbox-gl-js from version 0.40.1 to version 0.41.0 the map layer toggle stops working.

It fails silently so I don't see any clues in the console.

@ChrisLoer
Copy link
Contributor

Thanks for the help @Shongololo! The problem was not actually in setLayoutProperty, but in the rendering of circle layers.

PR #5429 introduced a change (https://github.com/mapbox/mapbox-gl-js/pull/5429/files#diff-f7d822aac0b25e51513a390117f672bd) that avoids drawing layers that are completely invisible. The isOpacityZero logic in circle_style_layer.js is slightly wrong, so that if the stroke of a circle is 0-width or transparent, the whole circle will be hidden, even if the fill of the circle is visible.

We'll get a fix out soon.

@ChrisLoer ChrisLoer changed the title version 0.41 breaks setLayoutProperty circle layers with invisible strokes don't render in 0.41.0 Oct 24, 2017
@jfirebaugh jfirebaugh modified the milestones: v0.41.1, v0.42 Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants