SuperMap.WinRT.Mapping.TiledWMTSLayer.GetTile C# (CSharp) Method

GetTile() public method

${mapping_TiledWMTSLayer_method_GetTileUrl_D}
public GetTile ( int indexX, int indexY, int level, CancellationToken cancellationToken ) : MapImage
indexX int
indexY int
level int
cancellationToken System.Threading.CancellationToken
return MapImage
        public override MapImage GetTile(int indexX, int indexY, int level, CancellationToken cancellationToken)
        {
            MapImage mapImage = new MapImage();
            mapImage.MapImageType = MapImageType.Url;
            if (tileMatrixIdentifiers == null)
            {
                mapImage.Url = string.Format(this.Url, tileMatrixs[level].Name, indexY, indexX);
                return mapImage;
            }
            else
            {
                int index = findMatrixLevel(this.Resolution);
                if (index == -1)
                {
                    return null;
                }
                string name = string.Empty;
                if (tileMatrixs != null)
                {
                    name = tileMatrixs[index].Name;
                    if (!CheckMatrix(name))
                    {
                        name = string.Empty;
                    }
                }
                else
                {
                    name = tileMatrixIdentifiers[index];
                }
                //string index = tileMatrixIdentifiers[];
                if (string.IsNullOrEmpty(name))
                {
                    return null;
                }
                else
                {
                    mapImage.Url = string.Format(this.Url, name, indexY, indexX);
                    return mapImage;
                }
            }

        }