mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
TilePyramidLayer overrides
This commit is contained in:
parent
eebf17e6fe
commit
8c53587643
|
|
@ -115,6 +115,20 @@ namespace MapControl
|
|||
return finalSize;
|
||||
}
|
||||
|
||||
protected override void UpdateRenderTransform()
|
||||
{
|
||||
if (TileMatrix != null)
|
||||
{
|
||||
// Tile matrix origin in pixels.
|
||||
//
|
||||
var tileMatrixOrigin = new Point(TileSize * TileMatrix.XMin, TileSize * TileMatrix.YMin);
|
||||
var tileMatrixScale = MapBase.ZoomLevelToScale(TileMatrix.ZoomLevel);
|
||||
|
||||
((MatrixTransform)RenderTransform).Matrix =
|
||||
ParentMap.ViewTransform.GetTileLayerTransform(tileMatrixScale, MapTopLeft, tileMatrixOrigin);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateTileCollection(bool reset)
|
||||
{
|
||||
if (ParentMap == null || !SupportedCrsIds.Contains(ParentMap.MapProjection.CrsId))
|
||||
|
|
@ -132,20 +146,6 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
protected override void UpdateRenderTransform()
|
||||
{
|
||||
if (TileMatrix != null)
|
||||
{
|
||||
// Tile matrix origin in pixels.
|
||||
//
|
||||
var tileMatrixOrigin = new Point(TileSize * TileMatrix.XMin, TileSize * TileMatrix.YMin);
|
||||
var tileMatrixScale = MapBase.ZoomLevelToScale(TileMatrix.ZoomLevel);
|
||||
|
||||
((MatrixTransform)RenderTransform).Matrix =
|
||||
ParentMap.ViewTransform.GetTileLayerTransform(tileMatrixScale, MapTopLeft, tileMatrixOrigin);
|
||||
}
|
||||
}
|
||||
|
||||
private bool SetTileMatrix()
|
||||
{
|
||||
// Add 0.001 to avoid rounding issues.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,14 @@ namespace MapControl
|
|||
return finalSize;
|
||||
}
|
||||
|
||||
protected override void UpdateRenderTransform()
|
||||
{
|
||||
foreach (var layer in ChildLayers)
|
||||
{
|
||||
layer.UpdateRenderTransform(ParentMap.ViewTransform);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateTileCollection(bool reset)
|
||||
{
|
||||
// reset parameter is ignored here because it is always false.
|
||||
|
|
@ -133,14 +141,6 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
protected override void UpdateRenderTransform()
|
||||
{
|
||||
foreach (var layer in ChildLayers)
|
||||
{
|
||||
layer.UpdateRenderTransform(ParentMap.ViewTransform);
|
||||
}
|
||||
}
|
||||
|
||||
private bool UpdateChildLayers(WmtsTileMatrixSet tileMatrixSet)
|
||||
{
|
||||
// Multiply scale by 1.001 to avoid rounding issues.
|
||||
|
|
|
|||
Loading…
Reference in a new issue