Use frame state for pixel to coord conversion
This commit is contained in:
@@ -9,6 +9,7 @@ goog.require('ol.layer.Vector');
|
||||
goog.require('ol.render.webgl.ReplayGroup');
|
||||
goog.require('ol.renderer.vector');
|
||||
goog.require('ol.renderer.webgl.Layer');
|
||||
goog.require('ol.vec.Mat4');
|
||||
|
||||
|
||||
|
||||
@@ -165,7 +166,9 @@ ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate =
|
||||
*/
|
||||
ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel =
|
||||
function(pixel, frameState, callback, thisArg) {
|
||||
var coordinate = this.getMap().getCoordinateFromPixel(pixel);
|
||||
var coordinate = pixel.slice();
|
||||
ol.vec.Mat4.multVec2(
|
||||
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
|
||||
var hasFeature = this.hasFeatureAtCoordinate(coordinate, frameState);
|
||||
|
||||
if (hasFeature) {
|
||||
|
||||
Reference in New Issue
Block a user