diff --git a/src/ol/tilecoord.js b/src/ol/tilecoord.js index d38bb9a9c7..190f83ac11 100644 --- a/src/ol/tilecoord.js +++ b/src/ol/tilecoord.js @@ -26,33 +26,6 @@ ol.QuadKeyCharCode = { }; -/** - * @param {string} quadKey Quad key. - * @return {ol.TileCoord} Tile coordinate. - */ -ol.tilecoord.createFromQuadKey = function(quadKey) { - var z = quadKey.length, x = 0, y = 0; - var mask = 1 << (z - 1); - var i; - for (i = 0; i < z; ++i) { - switch (quadKey.charCodeAt(i)) { - case ol.QuadKeyCharCode.ONE: - x += mask; - break; - case ol.QuadKeyCharCode.TWO: - y += mask; - break; - case ol.QuadKeyCharCode.THREE: - x += mask; - y += mask; - break; - } - mask >>= 1; - } - return [z, x, y]; -}; - - /** * @param {string} str String that follows pattern “z/x/y” where x, y and z are * numbers. diff --git a/test/spec/ol/tilecoord.test.js b/test/spec/ol/tilecoord.test.js index 8ee7c8938e..94477b0e5b 100644 --- a/test/spec/ol/tilecoord.test.js +++ b/test/spec/ol/tilecoord.test.js @@ -11,15 +11,6 @@ describe('ol.TileCoord', function() { }); }); - describe('create from quad key', function() { - it('sets x y z properties as expected', function() { - var tileCoord = ol.tilecoord.createFromQuadKey('213'); - expect(tileCoord[0]).to.eql(3); - expect(tileCoord[1]).to.eql(3); - expect(tileCoord[2]).to.eql(5); - }); - }); - describe('create from string', function() { it('sets x y z properties as expected', function() { var str = '1/2/3';