mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Version 4.17.0: Added support for WMTS
This commit is contained in:
parent
7e5c5c0671
commit
b5fe760c83
7 changed files with 112 additions and 125 deletions
|
|
@ -97,18 +97,19 @@ namespace MapControl
|
|||
{
|
||||
foreach (var layer in Children.Cast<WmtsTileMatrixLayer>())
|
||||
{
|
||||
layer.SetRenderTransform(ParentMap.MapProjection, ParentMap.Heading);
|
||||
layer.SetRenderTransform(ParentMap.MapProjection);
|
||||
}
|
||||
}
|
||||
|
||||
private bool UpdateChildLayers(WmtsTileMatrixSet tileMatrixSet)
|
||||
{
|
||||
bool layersChanged = false;
|
||||
var layersChanged = false;
|
||||
var maxScale = 1.001 * ParentMap.MapProjection.ViewportScale; // avoid rounding issues
|
||||
|
||||
// show all TileMatrix layers with Scale <= ViewportScale, or at least the first layer
|
||||
// show all TileMatrix layers with Scale <= maxScale, or at least the first layer
|
||||
//
|
||||
var currentMatrixes = tileMatrixSet.TileMatrixes
|
||||
.Where((matrix, i) => i == 0 || matrix.Scale <= ParentMap.MapProjection.ViewportScale)
|
||||
.Where((matrix, i) => i == 0 || matrix.Scale <= maxScale)
|
||||
.ToList();
|
||||
|
||||
if (this != ParentMap.MapLayer) // do not load background tiles
|
||||
|
|
@ -136,7 +137,7 @@ namespace MapControl
|
|||
layersChanged = true;
|
||||
}
|
||||
|
||||
if (layer.SetBounds(ParentMap.MapProjection, ParentMap.Heading, ParentMap.RenderSize))
|
||||
if (layer.SetBounds(ParentMap.MapProjection, ParentMap.RenderSize))
|
||||
{
|
||||
layersChanged = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue