mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Code style
This commit is contained in:
parent
b023bf9491
commit
799ad01447
|
|
@ -289,7 +289,8 @@ namespace MapControl.Caching
|
|||
deletedFileCount = directory.EnumerateDirectories().Sum(ScanDirectory);
|
||||
|
||||
foreach (var file in directory.EnumerateFiles()
|
||||
.Where(f => f.CreationTime > f.LastWriteTime && f.CreationTime <= DateTime.Now))
|
||||
.Where(file => file.CreationTime > file.LastWriteTime &&
|
||||
file.CreationTime <= DateTime.Now))
|
||||
{
|
||||
file.Delete();
|
||||
deletedFileCount++;
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ namespace MapControl
|
|||
|
||||
public bool Equals(Location location)
|
||||
{
|
||||
return location != null
|
||||
&& Math.Abs(location.Latitude - Latitude) < 1e-9
|
||||
&& Math.Abs(location.Longitude - Longitude) < 1e-9;
|
||||
return location != null &&
|
||||
Math.Abs(location.Latitude - Latitude) < 1e-9 &&
|
||||
Math.Abs(location.Longitude - Longitude) < 1e-9;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ namespace MapControl
|
|||
|
||||
foreach (var tileMatrix in currentMatrixes)
|
||||
{
|
||||
var layer = currentLayers.FirstOrDefault(l => l.WmtsTileMatrix == tileMatrix) ??
|
||||
var layer = currentLayers.FirstOrDefault(layer => layer.WmtsTileMatrix == tileMatrix) ??
|
||||
new WmtsTileMatrixLayer(tileMatrix, tileMatrixSet.TileMatrixes.IndexOf(tileMatrix));
|
||||
|
||||
if (layer.UpdateTiles(ParentMap.ViewTransform, ParentMap.ActualWidth, ParentMap.ActualHeight))
|
||||
|
|
@ -199,11 +199,12 @@ namespace MapControl
|
|||
{
|
||||
var capabilities = await WmtsCapabilities.ReadCapabilitiesAsync(CapabilitiesUri, Layer);
|
||||
|
||||
foreach (var tileMatrixSet in capabilities.TileMatrixSets
|
||||
.Where(s => !TileMatrixSets.ContainsKey(s.SupportedCrsId) ||
|
||||
PreferredTileMatrixSets != null && PreferredTileMatrixSets.Contains(s.Identifier)))
|
||||
foreach (var tms in capabilities.TileMatrixSets
|
||||
.Where(tms => !TileMatrixSets.ContainsKey(tms.SupportedCrsId) ||
|
||||
PreferredTileMatrixSets != null &&
|
||||
PreferredTileMatrixSets.Contains(tms.Identifier)))
|
||||
{
|
||||
TileMatrixSets[tileMatrixSet.SupportedCrsId] = tileMatrixSet;
|
||||
TileMatrixSets[tms.SupportedCrsId] = tms;
|
||||
}
|
||||
|
||||
Layer = capabilities.Layer;
|
||||
|
|
|
|||
Loading…
Reference in a new issue