Rename ol.TileCoord.fromString to createFromString

This commit is contained in:
Tom Payne
2012-07-25 17:43:08 +02:00
parent 7902803063
commit 8d936e7865
3 changed files with 28 additions and 28 deletions
+13 -13
View File
@@ -63,6 +63,19 @@ ol.TileCoord.createFromQuadKey = function(quadKey) {
};
/**
* @param {string} str String.
* @return {ol.TileCoord} Tile coord.
*/
ol.TileCoord.createFromString = function(str) {
var v = str.split('/');
v = goog.array.map(v, function(e, i, a) {
return parseInt(e, 10);
});
return new ol.TileCoord(v[0], v[1], v[2]);
};
/**
* @return {ol.TileCoord} Clone.
*/
@@ -107,16 +120,3 @@ ol.TileCoord.prototype.toQuadKey = function() {
ol.TileCoord.prototype.toString = function() {
return [this.z, this.x, this.y].join('/');
};
/**
* @param {string} str String.
* @return {ol.TileCoord} Tile coord.
*/
ol.TileCoord.fromString = function(str) {
var v = str.split('/');
v = goog.array.map(v, function(e, i, a) {
return parseInt(e, 10);
});
return new ol.TileCoord(v[0], v[1], v[2]);
};