Switch to sequential ID numbering. Fixes #226.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -622,6 +622,8 @@ OpenLayers.Util.getArgs = function(url) {
|
||||
return args;
|
||||
}
|
||||
|
||||
OpenLayers.Util.lastSeqID = 0;
|
||||
|
||||
/**
|
||||
* @param {String} prefix String to prefix random id. If null, default
|
||||
* is "id_"
|
||||
@@ -633,7 +635,8 @@ OpenLayers.Util.createUniqueID = function(prefix) {
|
||||
if (prefix == null) {
|
||||
prefix = "id_";
|
||||
}
|
||||
return prefix + Math.round(Math.random() * 10000);
|
||||
OpenLayers.Util.lastSeqID += 1;
|
||||
return prefix + OpenLayers.Util.lastSeqID;
|
||||
};
|
||||
|
||||
/** Constant inches per unit
|
||||
|
||||
Reference in New Issue
Block a user