public string GetTileUrl(TileCoordinate tile)
        {
            var gtile = TileHelper.ConvertTMSTileCoordinateToGoogleTileCoordinate(tile.Level, tile.Column, tile.Row);

            return(TileHelper.GetOSMTileUrlAddress(MapServiceUrl, new TileCoordinate()
            {
                Level = tile.Level,
                Column = gtile.X,
                Row = gtile.Y
            }));
        }
Beispiel #2
0
 static IEnumerable <TileCoordinate> GetTiles(int minz, int maxz, double minx, double miny, double maxx, double maxy)
 {
     for (int i = minz; i <= maxz; i++)
     {
         var tiles = TileHelper.GetTilesFromLatLon(i, minx, miny, maxx, maxy);
         foreach (var coord in tiles)
         {
             yield return(new TileCoordinate()
             {
                 Level = i, Column = coord.X, Row = coord.Y
             });
         }
     }
 }
        public string GetTileUrl(TileCoordinate tile)
        {
            //combine the user supplied values & defaults and override defaults
            NameValueCollection dict = new NameValueCollection();

            foreach (string item in DefaultQueryStringValues)
            {
                dict[item] = DefaultQueryStringValues[item];
            }
            foreach (string item in QueryStringValues)
            {
                dict[item] = QueryStringValues[item];
            }

            return(TileHelper.GetAGSDynamicUrlAddress(MapServiceUrl, dict, new TileCoordinate()
            {
                Level = tile.Level,
                Column = tile.Column,
                Row = tile.Row
            }));
        }
 public string GetTileUrl(TileCoordinate tile)
 {
     return(TileHelper.GetOSMTileUrlAddressWithSubdomains(UrlTemplate, SubDomains, tile));
 }