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:
Schuyler Erle
2007-03-09 21:54:41 +00:00
parent 27a220d1fa
commit dbdf9a3df8
2 changed files with 11 additions and 2 deletions

View File

@@ -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