always give features random id's. this prevents duplicate issues on zooming

git-svn-id: http://svn.openlayers.org/trunk/openlayers@987 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-20 16:00:43 +00:00
parent e75ece7909
commit 16b0f1b3ef
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -35,15 +35,14 @@ OpenLayers.Feature.prototype= {
* @constructor * @constructor
* *
* @param {OpenLayers.Layer} layer * @param {OpenLayers.Layer} layer
* @param {String} id
* @param {OpenLayers.LonLat} lonlat * @param {OpenLayers.LonLat} lonlat
* @param {Object} data * @param {Object} data
*/ */
initialize: function(layer, lonlat, data, id) { initialize: function(layer, lonlat, data) {
this.layer = layer; this.layer = layer;
this.lonlat = lonlat; this.lonlat = lonlat;
this.data = (data != null) ? data : new Object(); this.data = (data != null) ? data : new Object();
this.id = (id != null) ? id : OpenLayers.Util.createUniqueID('f'); this.id = OpenLayers.Util.createUniqueID('Feature_');
}, },
/** /**
+1 -1
View File
@@ -21,7 +21,7 @@ OpenLayers.Feature.WFS.prototype =
var newArguments = arguments; var newArguments = arguments;
if (arguments.length > 0) { if (arguments.length > 0) {
var data = this.processXMLNode(xmlNode); var data = this.processXMLNode(xmlNode);
newArguments = new Array(layer, data.lonlat, data, data.id) newArguments = new Array(layer, data.lonlat, data)
} }
OpenLayers.Feature.prototype.initialize.apply(this, newArguments); OpenLayers.Feature.prototype.initialize.apply(this, newArguments);