-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
queryRenderedFeatures returning incorrect fill-extrusion-base and fill-extrusion-height #9632
Comments
@danvk We actually don'y support fill-extrusions with Its captured here.
This is a part of the code that process's fill extrusion geometry and it completely skips |
A LineString geometry does have area if it's a fill extrusion: length x height = area. For not being supported, LineStrings with fill-extrusions work spectacularly well! I've been using them for at least a year and this is the first problem I've run into. Please don't fix the bug by removing them from the results completely! |
aah, I misunderstood the code there, looks like that code only skips triangulating the top "roof", but we still process the side walls for linestrings. @ryanhamley , can you please take a look at this? seems like a regression |
@danvk Can you create a minimal example showing this problem? Definitely looks like a bug but it's not obvious what's going wrong just looking at the output. |
@ryanhamley here's a repro: https://codepen.io/danvk/pen/WNQZQGG?editors=1000 whichever bit of the side you click, you'll see this in the console: The fill-extrusion-{base,height} properties always evaluate to 0 and 50, whereas they should vary depending on what you click. I believe the |
mapbox-gl-js version: 1.9.1
browser: Chrome
Steps to Trigger Behavior
I'm using fill extrusion layers with LineString geometries to color the sides of buildings. Before #9282, the
queryRenderedFeatures
would return objects with alayer.paint
containing style expressions that I could evaluate to determine the base and height for each feature.After #9282, these are evaluated to the incorrect values.
This is what the style for that layer looks like:
The
fill-extrusion-base
andfill-extrusion-height
properties should evaluate to 122.5 and 136, not 0 and 11.Link to Demonstration
I can try to put together a smaller repro if it's helpful.
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: