diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index d9043bb87b..6af36d01fe 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -36,11 +36,11 @@ OpenLayers.Feature.prototype= { * @param {OpenLayers.LonLat} lonlat * @param {Object} data */ - initialize: function(layer, id, lonlat, data) { + initialize: function(layer, lonlat, data, id) { this.layer = layer; - this.id = id; this.lonlat = lonlat; this.data = data; + this.id = (id ? id : 'f'+Math.Random()); }, /**