Allow addFeaturesInternal to add multiple features lacking an id

This commit is contained in:
Paul Spencer
2014-07-08 20:35:31 -04:00
parent a737cf0d99
commit a02d21d4b5
2 changed files with 71 additions and 1 deletions

View File

@@ -69,7 +69,9 @@ ol.source.ServerVector.prototype.addFeaturesInternal = function(features) {
for (i = 0, ii = features.length; i < ii; ++i) {
var feature = features[i];
var featureId = feature.getId();
if (!(featureId in this.loadedFeatures_)) {
if (!goog.isDef(featureId)) {
notLoadedFeatures.push(feature);
} else if (!(featureId in this.loadedFeatures_)) {
notLoadedFeatures.push(feature);
this.loadedFeatures_[featureId] = true;
}