/** * @inheritDoc */ public override TileRange GetTileCoordChildTileRange(int[] tileCoord, TileRange opt_tileRange = null, double[] opt_extent = null) { if (tileCoord[0] < this.MaxZoom) { var doubleX = 2 * tileCoord[1]; var doubleY = 2 * tileCoord[2]; return(TileRange.CreateOrUpdate( doubleX, doubleX + 1, doubleY, doubleY + 1, opt_tileRange)); } else { return(null); } }
/** * @inheritDoc */ public override bool ForEachTileCoordParentTileRange(int[] tileCoord, Func <int, TileRange, bool> callback, TileRange opt_tileRange = null, double[] opt_extent = null) { var tileRange = TileRange.CreateOrUpdate( 0, tileCoord[1], 0, tileCoord[2], opt_tileRange); int z; for (z = tileCoord[0] - 1; z >= this.MinZoom; --z) { tileRange.MinX = tileRange.MaxX >>= 1; tileRange.MinY = tileRange.MaxY >>= 1; if (callback(z, tileRange)) { return(true); } } return(false); }