REST_SampleCode.TileTDTMapsLayer.RefreshResolutions C# (CSharp) Method

RefreshResolutions() private method

private RefreshResolutions ( ) : void
return void
        private void RefreshResolutions()
        {
            string lt = this.layerType;
            Int32 resStart = 0;
            Int32 resLength = 0;
            if (lt == "vec")
            {
                resStart = 0;
                resLength = 17;
                this.levelOffset = 1;
            }
            else if (lt == "img")
            {
                resStart = 1;
                resLength = 17;
                this.levelOffset = 2;
            }
            else if (lt == "ter")
            {
                resStart = 0;
                resLength = 13;
                this.levelOffset = 1;
            }
            this.Resolutions = new double[resLength + 1 - resStart];
            if (this.projection == "4326")
            {
                this.Bounds = new Rectangle2D(-179.99999999999997, -90.0, 180.00000000000023, 89.99999999999994);
                this.Origin = new Point2D(-180, 90);
                for (Int32 i = resStart; i <= resLength; i++)
                {
                    this.Resolutions[i - resStart] = (1.40625 / 2 / Math.Pow(2, i));
                }
                this.proj = "c";
            }
            //EPSG:900913
            else
            {
                this.Bounds = new Rectangle2D(-20037508.3392, -20037508.3392, 20037508.3392, 20037508.3392);
                this.Origin = new Point2D(-20037508.3392, 20037508.3392);

                for (Int32 i = resStart; i <= resLength; i++)
                {

                    this.Resolutions[i - resStart] = (156543.0339 / 2 / Math.Pow(2, i));
                }
                this.proj = "w";
            }
        }