Skipped features support to ol.source.ImageVector

This commit is contained in:
Éric Lemoine
2014-06-11 09:12:16 +02:00
parent b411ccaa5b
commit 7a1e605f14
5 changed files with 14 additions and 6 deletions

View File

@@ -52,7 +52,9 @@ ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtPixel =
var extent = frameState.extent;
var resolution = frameState.view2DState.resolution;
var rotation = frameState.view2DState.rotation;
return source.forEachFeatureAtPixel(extent, resolution, rotation, coordinate,
var skippedFeatureUids = frameState.skippedFeatureUids_;
return source.forEachFeatureAtPixel(
extent, resolution, rotation, coordinate, skippedFeatureUids,
/**
* @param {ol.Feature} feature Feature.
* @return {?} Callback result.

View File

@@ -57,7 +57,9 @@ ol.renderer.dom.ImageLayer.prototype.forEachFeatureAtPixel =
var extent = frameState.extent;
var resolution = frameState.view2DState.resolution;
var rotation = frameState.view2DState.rotation;
return source.forEachFeatureAtPixel(extent, resolution, rotation, coordinate,
var skippedFeatureUids = frameState.skippedFeatureUids_;
return source.forEachFeatureAtPixel(
extent, resolution, rotation, coordinate, skippedFeatureUids,
/**
* @param {ol.Feature} feature Feature.
* @return {?} Callback result.

View File

@@ -83,7 +83,10 @@ ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtPixel =
var extent = frameState.extent;
var resolution = frameState.view2DState.resolution;
var rotation = frameState.view2DState.rotation;
return source.forEachFeatureAtPixel(extent, resolution, rotation, coordinate,
var skippedFeatureUids = frameState.skippedFeatureUids_;
return source.forEachFeatureAtPixel(
extent, resolution, rotation, coordinate, skippedFeatureUids,
/**
* @param {ol.Feature} feature Feature.
* @return {?} Callback result.

View File

@@ -144,13 +144,13 @@ ol.source.ImageVector.prototype.canvasFunctionInternal_ =
/**
* @inheritDoc
*/
ol.source.ImageVector.prototype.forEachFeatureAtPixel =
function(extent, resolution, rotation, coordinate, callback) {
ol.source.ImageVector.prototype.forEachFeatureAtPixel = function(
extent, resolution, rotation, coordinate, skippedFeatureUids, callback) {
if (goog.isNull(this.replayGroup_)) {
return undefined;
} else {
return this.replayGroup_.forEachGeometryAtPixel(
extent, resolution, 0, coordinate, {},
extent, resolution, 0, coordinate, skippedFeatureUids,
/**
* @param {ol.geom.Geometry} geometry Geometry.
* @param {Object} data Data.

View File

@@ -88,6 +88,7 @@ goog.inherits(ol.source.Source, ol.Observable);
* @param {number} resolution Resolution.
* @param {number} rotation Rotation.
* @param {ol.Coordinate} coordinate Coordinate.
* @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
* @param {function(ol.Feature): T} callback Feature callback.
* @return {T|undefined} Callback result.
* @template T