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

Pass null as forEachFeatureAtPixel layer arg for unmanaged layers #4391

Merged

Conversation

@ahocevar
Copy link
Member

@ahocevar ahocevar commented Nov 6, 2015

Features on the removed ol.FeatureOverlay were detected by ol.Map#forEachFeatureAtPixel, and the layer arg passed to the handler function was null. This change makes it so the same behaviour applies to features on an unmanaged vector layer. Previously the forEachFeatureAtPixel handler was called with a reference to the unmanaged layer as layer arg.

See #4143 (comment).

Fixes #4114.

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 6, 2015

@bartvde, you may want to have a look to see how this affects #4114.

@bartvde
Copy link
Member

@bartvde bartvde commented Nov 7, 2015

#4114 is this still the same @ahocevar with this change
Assuming you mean if I still see the issue in your branch?

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 7, 2015

@bartvde I meant you should look at my branch to see if it makes your life easier, so you don't need a code snippet like the one you posted in your application.

Your issue is unlikely to be fixed with this branch, but it might. Because now forEachFeatureAtPixel is only called once for features that are on multiple unmanaged layers.

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 8, 2015

@bartvde I added a commit that fixes #4114. Please review.

@bartvde
Copy link
Member

@bartvde bartvde commented Nov 8, 2015

thanks @ahocevar I can confirm that this now fixes my issue from #4114
I'll do a review of the code tomorrow morning if no one gets to it before then.

@ahocevar ahocevar force-pushed the ahocevar:unmanaged-layer-foreachfeatureatpixel branch from 4680c8b to b6db331 Nov 8, 2015
@bartvde
Copy link
Member

@bartvde bartvde commented Nov 9, 2015

LGTM @ahocevar does this deserve a mention in the release notes?

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 9, 2015

I can add that, yes.

@ahocevar ahocevar force-pushed the ahocevar:unmanaged-layer-foreachfeatureatpixel branch from f497b37 to a446147 Nov 9, 2015
@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 9, 2015

Done @bartvde.

@bartvde
Copy link
Member

@bartvde bartvde commented Nov 9, 2015

LGTM @ahocevar please merge if Travis agrees again

ahocevar added a commit that referenced this pull request Nov 9, 2015
…atpixel

Pass null as forEachFeatureAtPixel layer arg for unmanaged layers
@ahocevar ahocevar merged commit bfbb802 into openlayers:master Nov 9, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 75.408%
Details
@ahocevar ahocevar deleted the ahocevar:unmanaged-layer-foreachfeatureatpixel branch Nov 9, 2015
ahocevar added a commit to ahocevar/openlayers that referenced this pull request Nov 18, 2015
ahocevar added a commit that referenced this pull request Nov 19, 2015
Fix select interaction regression caused by #4391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants