I'm trying to work with tile caching to speed up my WMS implementation, and I can't seem to get the files to save. Calling the 'SaveTiles' method of the FileNativeImageTileCache or the FileBitmapTileCache doesn't seem to actually do anything. Might you be able to help me figure this out?
Thanks
-Dustin
Bitmap b = new Bitmap(MapStream); TileMatrix tm = new MapSuiteTileMatrix(MapEngine.GetCurrentScale(MapRequest.BoundingBox, MapRequest.Width, GeographyUnit.DecimalDegree), 128, 128, GeographyUnit.DecimalDegree); FileNativeImageTileCache t = new FileNativeImageTileCache(this.MapPath("") + @"\App_Data\Cache", "Stuff", TileImageFormat.Png, tm); t.SaveTiles(b, MapRequest.BoundingBox);
Alright, scratch that, it looks like I had two issues. One was folder security, somehow the folder got set to ReadOnly. I also switched to FileBitmapCache, and that seemed to solve the problem.
Maybe it was just the folder security, I’m not 100%. I made the changes in tandem, and it seems to be working. I’m not one to look a gift horse in the mouth. =) -Dustin