// Constructors, Finalizer and Dispose //====================================================================== public CollectionImageTileBuilder(Collection collection, ImageRequest imageRequest, int maxLevel, int tilePixelDimension) { m_collection = collection; m_level = imageRequest.Level; m_tilePixelDimension = tilePixelDimension; m_imageDimensionCount = (1 << (maxLevel - imageRequest.Level)); m_levelBitCount = maxLevel - imageRequest.Level; int mortonRange; m_mortonStart = MortonHelpers.LevelXYToMorton(imageRequest.Level, imageRequest.X, imageRequest.Y, maxLevel, out mortonRange); }
public void ServeImageTile(HttpContext context) { ImageRequest request = new ImageRequest(context.Request.Url); Collection collection = m_collectionCache.Get(request.DzcName); if (null == collection) { //TODO: Draw this message onto an image tile so it can be seen in Pivot. context.Response.StatusCode = (int)HttpStatusCode.NotFound; context.Response.StatusDescription = "Pivot image not found. Cache may have expired."; return; } CollectionImageTileBuilder builder = new CollectionImageTileBuilder(collection, request, DzcSerializer.DefaultMaxLevel, DzcSerializer.DefaultTileDimension); builder.Write(context.Response); }