// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/layers/TileInfo","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../SpatialReference ../geometry/Point ./LOD".split(" "),function(c,f,d,h,k,l,g,m,n){c=c(null,{declaredClass:"esri.layers.TileInfo",constructor:function(a){f.mixin(this,a);this.width=this.cols;this.height=this.rows;this._levelToLOD={};a=this.spatialReference;var b=this.origin;a&&(a=this.spatialReference=new g(a.toJson?a.toJson():a));b&&(this.origin=new m(b.toJson?b.toJson():b),!b.spatialReference&&
a&&this.origin.setSpatialReference(new g(a.toJson())));this.lods=d.map(this.lods,function(a){return new n(a)});d.forEach(this.lods,function(a){this._levelToLOD[a.level]=a},this);a=!1;var b=this.spatialReference,c=this.origin;if(b&&c){var e=b._getInfo();e&&(a=b._isWrappable()&&Math.abs(e.origin[0]-c.x)<=e.dx)}this.isWrappable=a},toJson:function(){return l.fixJson({rows:this.rows,cols:this.cols,dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin&&this.origin.toJson(),
spatialReference:this.spatialReference&&this.spatialReference.toJson(),lods:this.lods&&d.map(this.lods,function(a){return a.toJson()})})},lodAt:function(a){return this._levelToLOD&&this._levelToLOD[a]||null}});h("extend-esri")&&f.setObject("layers.TileInfo",c,k);return c});