Use getInExtent instead of forEachInExtent

This commit is contained in:
Frederic Junod
2014-06-16 17:00:09 +02:00
parent 3fdd0e4bf7
commit 9b2a874282

View File

@@ -399,11 +399,7 @@ ol.interaction.Modify.prototype.handlePointerDown = function(evt) {
var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
var vertex = geometry.getCoordinates();
var vertexExtent = ol.extent.boundingExtent([vertex]);
var segmentDataMatches = [];
this.rBush_.forEachInExtent(vertexExtent,
function(segmentData) {
segmentDataMatches.push(segmentData);
});
var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);
var distinctFeatures = {};
for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {
var segmentDataMatch = segmentDataMatches[i];