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:
@@ -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_');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user