mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
MapTileLayer implementation
This commit is contained in:
parent
933cb7f2ba
commit
407f786640
4 changed files with 17 additions and 26 deletions
|
|
@ -109,33 +109,24 @@ namespace MapControl
|
|||
return finalSize;
|
||||
}
|
||||
|
||||
protected override async Task UpdateTileLayerAsync(bool tileSourceChanged)
|
||||
protected override async Task UpdateTileLayerAsync(bool resetTiles)
|
||||
{
|
||||
var updateTiles = false;
|
||||
|
||||
if (ParentMap == null || ParentMap.MapProjection.Type != MapProjectionType.WebMercator)
|
||||
{
|
||||
updateTiles = TileMatrix != null;
|
||||
TileMatrix = null;
|
||||
Children.Clear();
|
||||
|
||||
await LoadTilesAsync(null, null); // stop TileImageLoader
|
||||
}
|
||||
else
|
||||
else if (SetTileMatrix() || resetTiles)
|
||||
{
|
||||
if (tileSourceChanged)
|
||||
{
|
||||
Tiles = new TileCollection(); // clear all
|
||||
updateTiles = true;
|
||||
}
|
||||
|
||||
if (SetTileMatrix())
|
||||
{
|
||||
updateTiles = true;
|
||||
}
|
||||
|
||||
SetRenderTransform();
|
||||
}
|
||||
|
||||
if (updateTiles)
|
||||
{
|
||||
if (resetTiles)
|
||||
{
|
||||
Tiles.Clear();
|
||||
}
|
||||
|
||||
UpdateTiles();
|
||||
|
||||
await LoadTilesAsync(Tiles, SourceName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue