Hi Gary,
So this is interesting I made the change that I think you are suggesting here is the code now -
BingMapsOverlay bingMapsOverlay =
new BingMapsOverlay(“our key”);
bingMapsOverlay.MapType = BingMapsMapType.Aerial;
bingMapsOverlay.CacheDirectory = @“C:\Temp\BING”;
_map.Overlays.Add(“BING”, bingMapsOverlay);
This does seem to work as far as downloading tiles to the specified tile cache but as soon as I start panning I get this error -
The process cannot access the file ‘C:\Temp\BING\BingMapsMetadata.xml’ because it is being used by another process.
I am using version 5.5.0.96 of the wpf desktop edition.
And here is the call stack -
> mscorlib.dll!System.IO.__Error.WinIOError(int errorCode = -2147024864, string maybeFullPath = “C:\Temp\BING\BingMapsMetadata.xml”) + 0x321 bytes
mscorlib.dll!System.IO.FileStream.Init(string path, System.IO.FileMode mode, System.IO.FileAccess access = Write, int rights, bool useRights = false, System.IO.FileShare share, int bufferSize = 4096, System.IO.FileOptions options, Microsoft.Win32.Win32Native.SECURITY_ATTRIBUTES secAttrs, string msgPath, bool bFromProxy, bool useLongPath) + 0x477 bytes
mscorlib.dll!System.IO.FileStream.FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) + 0x54 bytes
System.Xml.dll!System.Xml.XmlDocument.Save(string filename) + 0x8b bytes
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BingMapsLayer.KVw=(string Klw= = “C:\Temp\BING\BingMapsMetadata.xml”) + 0x185 bytes
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BingMapsLayer.KFw=() + 0xa2 bytes
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BingMapsLayer.OpenCore() + 0x3d bytes
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.Layer.Open() + 0x3a bytes
WpfDesktopEdition.dll!ThinkGeo.MapSuite.WpfDesktopEdition.LayerTile.DrawCore(ThinkGeo.MapSuite.Core.GeoCanvas geoCanvas = {ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}) + 0x257 bytes
WpfDesktopEdition.dll!ThinkGeo.MapSuite.WpfDesktopEdition.Tile.Draw(ThinkGeo.MapSuite.Core.GeoCanvas geoCanvas = {ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}) + 0xbd bytes
WpfDesktopEdition.dll!ThinkGeo.MapSuite.WpfDesktopEdition.Tile.KxU=(object LBU= = {ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}) + 0xe6 bytes
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x2d bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x5a bytes
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x147 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x2d bytes
Thanks,
Chris