added getLevel()

This commit is contained in:
Andy Gup 2014-06-10 13:17:51 -06:00
parent a839398121
commit 8e74f6bf00

View File

@ -20,6 +20,7 @@ define([
tileInfo: null,
_imageType:"",
_level:null, //current zoom level
/**
* Utility method to get the basemap layer reference
@ -119,6 +120,8 @@ define([
console.assert(!isNaN(level) && !isNaN(row) && !isNaN(col), "bad tile requested");
console.log("looking for tile",level,row,col);
this._level = level;
var url = this.url + "/tile/" + level + "/" + row + "/" + col;
console.log("LIBRARY ONLINE " + this.offline.online)
if( this.offline.online )
@ -188,6 +191,14 @@ define([
return levelEstimation;
},
/**
* Returns the current zoom level
* @returns {number}
*/
getLevel: function(){
return this._level;
},
/**
* Retrieves tiles and stores them in the local cache.
* @param minLevel