Version 4.17.0: Added support for WMTS

This commit is contained in:
ClemensF 2020-03-20 21:45:54 +01:00
parent f3d0dd0f74
commit b687487be2
2 changed files with 5 additions and 1 deletions

View file

@ -102,7 +102,7 @@ namespace MapControl
/// <summary> /// <summary>
/// Maximum number of background tile levels. Default value is 8. /// Maximum number of background tile levels. Default value is 8.
/// Is only effective in a MapTileLayer that is the MapLayer of its ParentMap. /// Only effective in a MapTileLayer or WmtsTileLayer that is the MapLayer of its ParentMap.
/// </summary> /// </summary>
public int MaxBackgroundLevels public int MaxBackgroundLevels
{ {

View file

@ -125,6 +125,10 @@ namespace MapControl
{ {
currentMatrixes = currentMatrixes.Skip(currentMatrixes.Count - 1).ToList(); // last element only currentMatrixes = currentMatrixes.Skip(currentMatrixes.Count - 1).ToList(); // last element only
} }
else if (currentMatrixes.Count > MaxBackgroundLevels + 1)
{
currentMatrixes = currentMatrixes.Skip(currentMatrixes.Count - MaxBackgroundLevels - 1).ToList();
}
var currentLayers = Children.Cast<WmtsTileMatrixLayer>() var currentLayers = Children.Cast<WmtsTileMatrixLayer>()
.Where(layer => currentMatrixes.Contains(layer.TileMatrix)) .Where(layer => currentMatrixes.Contains(layer.TileMatrix))