Ignore layer filter for unmanaged layers #3883

Merged
merged 1 commit into from Jul 8, 2015

Conversation

Projects
None yet
3 participants
@ahocevar
Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@bartvde

bartvde Jul 8, 2015

Member

LGTM

Member

bartvde commented Jul 8, 2015

LGTM

ahocevar added a commit that referenced this pull request Jul 8, 2015

Merge pull request #3883 from ahocevar/foreachfeatureatpixel-unmanage…
…d-always

Ignore layer filter for unmanaged layers

@ahocevar ahocevar merged commit afce912 into openlayers:master Jul 8, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.51%) to 73.36%
Details

@ahocevar ahocevar deleted the ahocevar:foreachfeatureatpixel-unmanaged-always branch Jul 8, 2015

@elemoine

This comment has been minimized.

Show comment
Hide comment
@elemoine

elemoine Jul 9, 2015

Member

I wonder if this fixes #3885 as well.

Member

elemoine commented Jul 9, 2015

I wonder if this fixes #3885 as well.

@elemoine elemoine referenced this pull request in GFDRR/thinkhazard Aug 6, 2015

Merged

Show division outline on map #250

elemoine added a commit to elemoine/ol3 that referenced this pull request Sep 21, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change, and modifies the Select interaction to make sure that the unmanaged layer it uses internally is not filtered out when the user provides a layer filter.

elemoine added a commit to elemoine/ol3 that referenced this pull request Sep 21, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change, and modifies the Select interaction to make sure that the unmanaged layer it uses internally is not filtered out when the user provides a layer filter.

elemoine added a commit to elemoine/ol3 that referenced this pull request Sep 23, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change, and modifies the Select interaction to make sure that the unmanaged layer it uses internally is not filtered out when the user provides a layer filter.
@@ -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 ||

This comment has been minimized.

@bartvde

bartvde Sep 28, 2015

Member

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

@bartvde

bartvde Sep 28, 2015

Member

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

This comment has been minimized.

@bartvde

bartvde Sep 28, 2015

Member

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?

@bartvde

bartvde Sep 28, 2015

Member

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 added a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.

ahocevar added a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.

ahocevar added a commit to ahocevar/openlayers that referenced this pull request Nov 22, 2015

Do not ignore layer filter for unmanaged layers
PR #3883 made `forEachFeatureAtPixel` ignore unmanaged layers. This commit reverts that change.

ahocevar added a commit to ahocevar/openlayers that referenced this pull request Nov 30, 2015

Do not ignore layer filter for unmanaged layers
PR #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