-
-
Notifications
You must be signed in to change notification settings - Fork 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
Support for hit detection in styles with custom rendering #12646
Support for hit detection in styles with custom rendering #12646
Conversation
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.
Good work! As far as I can tell, this is exactly what I had in mind. Maybe add a test and an example, then this should be good.
@ahocevar OK :) Sorry for the delayed response, had a long labor day weekend. So I will add tests and and example to your samples library. I need to think about what would be a good case to have different renderer for hit detection. |
@ahocevar Hi Andreas, I am having trouble starting
Any suggestion on how to fix this one? |
@ahocevar Hi Andrea, added a sample for custom hit renderer, I kind of based it on the existing custom renderer sample for circle and showed that only label is used for hit detection. Let me know what you think. Thanks. |
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.
Thanks for working on this neat feature, @ashchurova.
@ahocevar Hi Andreas, no sure why these unit tests are failing on the server. All unit tests pass on my machine. Could it be that there is a race condition some sort? Thank you. |
@ahocevar any update on when this PR will be merged or any other feedback? Thanks. |
Hey @ashchurova, sorry this is taking so long. Unfortunately I have been too busy with my day job and FOSS4G preparation. I'll be looking into it as soon as possible. |
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.
Excellent work, @ashchurova! Thanks a lot for this contribution, and thanks for adding an example that shows custom style renderers in action.
@MoonE, I think all your comments were properly addressed, but please double-check and approve when you're happy too. |
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.
The requested changes are good, thanks @ashchurova.
@ashchurova It is already published on the dev tag. |
This fix is for Issue 8136. As per @ahocevar request defined new optional property for
ol.style.Style
type calledhitDetectionRenderer
and it is used if specified. If it is not specified logic inCanvasBuilder.drawCustom
falls back to passed renderer. This is my first time contributing so I am new to the process. @ahocevar you did mention in your comments that you wanted use hitDetectionRenderer when no custom renderer is specified. Still researching how to do that. Because that would mean recoupling drawing from hit detection instructions.