mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Class names in Debug output
This commit is contained in:
parent
84cd6e2f9a
commit
aa6018cf0e
18 changed files with 64 additions and 66 deletions
|
|
@ -59,12 +59,12 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"BingMapsTileLayer: {metadataUri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(BingMapsTileLayer)}: {metadataUri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("BingMapsTileLayer requires a Bing Maps API Key");
|
||||
Debug.WriteLine($"{nameof(BingMapsTileLayer)} requires a Bing Maps API Key");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"GeoImage: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(GeoImage)}: {sourcePath}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -138,13 +138,11 @@ namespace MapControl
|
|||
|
||||
private static async Task<GeoBitmap> ReadWorldFileImageAsync(string sourcePath, string worldFilePath)
|
||||
{
|
||||
var geoBitmap = new GeoBitmap();
|
||||
|
||||
geoBitmap.Bitmap = (BitmapSource)await ImageLoader.LoadImageAsync(sourcePath);
|
||||
|
||||
geoBitmap.Transform = await Task.Run(() => ReadWorldFileMatrix(worldFilePath));
|
||||
|
||||
return geoBitmap;
|
||||
return new GeoBitmap
|
||||
{
|
||||
Bitmap = (BitmapSource)await ImageLoader.LoadImageAsync(sourcePath),
|
||||
Transform = await Task.Run(() => ReadWorldFileMatrix(worldFilePath))
|
||||
};
|
||||
}
|
||||
|
||||
private static Matrix ReadWorldFileMatrix(string worldFilePath)
|
||||
|
|
@ -170,7 +168,7 @@ namespace MapControl
|
|||
parameters[5]); // line 6: F or OffsetY
|
||||
}
|
||||
|
||||
private static MapProjection GetProjection(string sourcePath, short[] geoKeyDirectory)
|
||||
private static MapProjection GetProjection(short[] geoKeyDirectory)
|
||||
{
|
||||
MapProjection projection = null;
|
||||
|
||||
|
|
@ -181,7 +179,7 @@ namespace MapControl
|
|||
int epsgCode = geoKeyDirectory[i + 3];
|
||||
|
||||
projection = MapProjectionFactory.Instance.GetProjection(epsgCode) ??
|
||||
throw new ArgumentException($"Can not create projection EPSG:{epsgCode} in {sourcePath}.");
|
||||
throw new ArgumentException($"Can not create projection EPSG:{epsgCode}.");
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"GroundOverlayPanel: {sourcePath}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(GroundOverlay)}: {sourcePath}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MapControl.Caching
|
|||
|
||||
rootPath = path;
|
||||
|
||||
Debug.WriteLine($"ImageFileCache: {rootPath}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: {rootPath}");
|
||||
|
||||
ThreadPool.QueueUserWorkItem(o => Clean());
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed reading {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed reading {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed reading {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed reading {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed writing {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed writing {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed writing {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed writing {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed deleting {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed deleting {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed deleting {path}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed deleting {path}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ namespace MapControl.Caching
|
|||
|
||||
if (deletedFileCount > 0)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Deleted {deletedFileCount} expired files.");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Deleted {deletedFileCount} expired files.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Invalid key {key}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Invalid key {key}: {ex.Message}");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -264,7 +264,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {directory.FullName}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {directory.FullName}: {ex.Message}");
|
||||
}
|
||||
|
||||
return deletedFileCount;
|
||||
|
|
@ -299,7 +299,7 @@ namespace MapControl.Caching
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageFileCache: Failed cleaning {file.FullName}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageFileCache)}: Failed cleaning {file.FullName}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {ex.Message}");
|
||||
}
|
||||
|
||||
progress?.Report(1d);
|
||||
|
|
@ -121,13 +121,13 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {(int)responseMessage.StatusCode} {responseMessage.ReasonPhrase}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {(int)responseMessage.StatusCode} {responseMessage.ReasonPhrase}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"ImageLoader: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(ImageLoader)}: {uri}: {ex.Message}");
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapImageLayer: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapImageLayer)}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapOverlaysControl: {sourcePath}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapOverlaysPanel)}: {sourcePath}: {ex.Message}");
|
||||
|
||||
overlay = new MapPanel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"MapPanel.ArrangeOverride: {element}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(MapPanel)}.{nameof(ArrangeOverride)}: {element}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader: {tile.ZoomLevel}/{tile.Column}/{tile.Row}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}: {tile.ZoomLevel}/{tile.Column}/{tile.Row}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader.Cache.GetAsync: {cacheKey}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}.{nameof(Cache)}.{nameof(Cache.GetAsync)}: {cacheKey}: {ex.Message}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"TileImageLoader.Cache.SetAsync: {cacheKey}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(TileImageLoader)}.{nameof(Cache)}.{nameof(Cache.SetAsync)}: {cacheKey}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -334,7 +334,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmsImageLayer: {uri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmsImageLayer)}: {uri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine($"WmtsTileLayer: {CapabilitiesUri}: {ex.Message}");
|
||||
Debug.WriteLine($"{nameof(WmtsTileLayer)}: {CapabilitiesUri}: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue