Remove unnecessary charcode enum
This commit is contained in:
committed by
Tim Schaub
parent
b44685494f
commit
1beddcd99a
@@ -1,17 +1,6 @@
|
||||
goog.provide('ol.tilecoord');
|
||||
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
ol.QuadKeyCharCode = {
|
||||
ZERO: '0'.charCodeAt(0),
|
||||
ONE: '1'.charCodeAt(0),
|
||||
TWO: '2'.charCodeAt(0),
|
||||
THREE: '3'.charCodeAt(0)
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} str String that follows pattern “z/x/y” where x, y and z are
|
||||
* numbers.
|
||||
@@ -76,7 +65,8 @@ ol.tilecoord.quadKey = function(tileCoord) {
|
||||
var mask = 1 << (z - 1);
|
||||
var i, charCode;
|
||||
for (i = 0; i < z; ++i) {
|
||||
charCode = ol.QuadKeyCharCode.ZERO;
|
||||
// 48 is charCode for 0 - '0'.charCodeAt(0)
|
||||
charCode = 48;
|
||||
if (tileCoord[1] & mask) {
|
||||
charCode += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user