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

Ignore layer filter for unmanaged layers #3883

Merged

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Jul 7, 2015

To make unmanaged vector layers work like the removed ol.FeatureOverlay, the layer filter for ol.Map#forEachFeatureAtPixel needs to ignore unmanaged layers.

Fixes #3878.

To make unmanaged vector layers work like the removed ol.FeatureOverlay,
the layer filter for ol.Map#forEachFeatureAtPixel needs to ignore unmanaged
layers.
@ahocevar ahocevar force-pushed the foreachfeatureatpixel-unmanaged-always branch from 6bef2ce to 26e146b Compare July 7, 2015 20:25
@bartvde
Copy link
Member

bartvde commented Jul 8, 2015

LGTM

ahocevar added a commit that referenced this pull request Jul 8, 2015
…d-always

Ignore layer filter for unmanaged layers
@ahocevar ahocevar merged commit afce912 into openlayers:master Jul 8, 2015
@ahocevar ahocevar deleted the foreachfeatureatpixel-unmanaged-always branch July 8, 2015 22:03
@elemoine
Copy link
Member

elemoine commented Jul 9, 2015

I wonder if this fixes #3885 as well.

@@ -167,8 +167,9 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate =
for (i = numLayers - 1; i >= 0; --i) {
var layerState = layerStates[i];
var layer = layerState.layer;
if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
layerFilter.call(thisArg2, layer)) {
if (!layerState.managed ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be if (layerState.managed && ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I guess I took @elemoine's words in #4143 too literally here: PR #3883 made forEachFeatureAtPixel ignore unmanaged layers -> wrt layer filtering was meant I guess. I guess I'll need to filter it out myself, but if I'm reading things correctly, I can only do this after @elemoine's changes get in?

ahocevar pushed a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015
PR openlayers#3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.
ahocevar pushed a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015
PR openlayers#3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.
ahocevar pushed a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015
PR openlayers#3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.
ahocevar pushed a commit to ahocevar/openlayers that referenced this pull request Nov 30, 2015
PR openlayers#3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants