mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 22:18:56 +00:00
Add IsBaseMapLayer property
This commit is contained in:
parent
681da9b625
commit
c17092cd38
4 changed files with 12 additions and 7 deletions
|
|
@ -120,15 +120,15 @@ namespace MapControl
|
|||
var layersChanged = false;
|
||||
var maxScale = 1.001 * ParentMap.ViewTransform.Scale; // avoid rounding issues
|
||||
|
||||
// show all TileMatrix layers with Scale <= maxScale, at least the first layer
|
||||
// show all WmtsTileMatrix layers with Scale <= maxScale, at least the first layer
|
||||
//
|
||||
var currentMatrixes = tileMatrixSet.TileMatrixes
|
||||
.Where((matrix, i) => i == 0 || matrix.Scale <= maxScale)
|
||||
.ToList();
|
||||
|
||||
if (!LoadBackgroundTiles)
|
||||
if (!IsBaseMapLayer) // show only the last layer
|
||||
{
|
||||
currentMatrixes = currentMatrixes.Skip(currentMatrixes.Count - 1).ToList(); // last element only
|
||||
currentMatrixes = currentMatrixes.Skip(currentMatrixes.Count - 1).ToList();
|
||||
}
|
||||
else if (currentMatrixes.Count > MaxBackgroundLevels + 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue