-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Core] Ensure queryRenderedFeatures accounts for icons with *-offset … #13105
Conversation
0d255ac
to
d5dfa1b
Compare
looks like you need to update the tests in cross_tile_symbol_index.test.cpp – you can run the tests locally by using the |
const Point<float> bl = util::rotate(Point<float>(x1, y2), rotateRadians); | ||
const Point<float> br = util::rotate(Point<float>(x2, y2), rotateRadians); | ||
|
||
const float xMin = std::min({tl.x, tr.x, bl.x, br.x}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you bring over the comments from GL JS here or something similar? I think the "we have to represent on-axis geometry, so take the envelope of the rotated geometry" step is fairly non-obvious to someone casually browsing the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied over your comments
Overall this looks great to me! 🚀 |
@mollymerp Thanks for pointing that out! I was having trouble figuring out why the tests broke once I rebased against master. |
d5dfa1b
to
10e9fd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍏 after squashing the fixup commits
Fixes #12909 and implements #11872
This is a pretty straightforward port of mapbox/mapbox-gl-js#6631 which allows icons with
icon-rotate
andicon-offset
to show up inqueryRenderedFeatures
results as expected.