Keep R-Tree up-to-date in ol.source.Vector
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
// FIXME bulk feature upload - suppress events
|
// FIXME bulk feature upload - suppress events
|
||||||
// FIXME put features in an ol.Collection
|
// FIXME put features in an ol.Collection
|
||||||
// FIXME make change-detection more refined (notably, geometry hint)
|
// FIXME make change-detection more refined (notably, geometry hint)
|
||||||
// FIXME keep R-Tree up-to-date, probably needs a new R-Tree implementation
|
|
||||||
|
|
||||||
goog.provide('ol.source.Vector');
|
goog.provide('ol.source.Vector');
|
||||||
|
|
||||||
@@ -129,8 +128,8 @@ ol.source.Vector.prototype.getAllFeaturesInExtent = function(extent) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
|
ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
|
||||||
//var feature = /** @type {ol.Feature} */ (event.target);
|
var feature = /** @type {ol.Feature} */ (event.target);
|
||||||
// FIXME keep R-Tree up to date
|
this.rBush_.update(feature.getGeometry().getExtent(), feature);
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user