SuperMap.Connector.CloudMapProvider.GetTile C# (CSharp) Method

GetTile() public method

public GetTile ( string mapName, TileInfo tileInfo, ImageOutputOption imageOutputOption ) : MapImage
mapName string
tileInfo SuperMap.Connector.Utility.TileInfo
imageOutputOption SuperMap.Connector.Utility.ImageOutputOption
return SuperMap.Connector.Utility.MapImage
        public MapImage GetTile(string mapName, TileInfo tileInfo, ImageOutputOption imageOutputOption)
        {
            int scale = (int)Math.Floor(1 / tileInfo.Scale);
            string url = string.Format("{0}/output/cache/{1}_{2}x{3}/{4}/{5}/{6}.png",
                this._serviceUrl, mapName, tileInfo.Width, tileInfo.Height, scale, tileInfo.TileIndex.RowIndex, tileInfo.TileIndex.ColIndex);
            MapImage mapImage = null;
            if (imageOutputOption == null || (imageOutputOption != null && imageOutputOption.ImageReturnType == ImageReturnType.URL))
            {
                mapImage = new MapImage()
                {
                    ImageUrl = url
                };
            }
            else
            {
                byte[] imageData = SynchHttpRequest.GetRequestBytes(url);
                mapImage = new MapImage()
                {
                    ImageData = imageData
                };
            }
            return mapImage;
        }
    }