Remove unused ol.tilecoord.createFromString function
This commit is contained in:
@@ -1,22 +1,5 @@
|
|||||||
goog.provide('ol.tilecoord');
|
goog.provide('ol.tilecoord');
|
||||||
|
|
||||||
goog.require('ol');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {string} str String that follows pattern “z/x/y” where x, y and z are
|
|
||||||
* numbers.
|
|
||||||
* @return {ol.TileCoord} Tile coord.
|
|
||||||
*/
|
|
||||||
ol.tilecoord.createFromString = function(str) {
|
|
||||||
var v = str.split('/');
|
|
||||||
ol.DEBUG && console.assert(v.length === 3,
|
|
||||||
'must provide a string in "z/x/y" format, got "%s"', str);
|
|
||||||
return v.map(function(e) {
|
|
||||||
return parseInt(e, 10);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} z Z.
|
* @param {number} z Z.
|
||||||
|
|||||||
@@ -15,16 +15,6 @@ describe('ol.TileCoord', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('create from string', function() {
|
|
||||||
it('sets x y z properties as expected', function() {
|
|
||||||
var str = '1/2/3';
|
|
||||||
var tileCoord = ol.tilecoord.createFromString(str);
|
|
||||||
expect(tileCoord[0]).to.eql(1);
|
|
||||||
expect(tileCoord[1]).to.eql(2);
|
|
||||||
expect(tileCoord[2]).to.eql(3);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('call quadKey', function() {
|
describe('call quadKey', function() {
|
||||||
it('returns expected string', function() {
|
it('returns expected string', function() {
|
||||||
var tileCoord = [3, 3, 5];
|
var tileCoord = [3, 3, 5];
|
||||||
|
|||||||
Reference in New Issue
Block a user