void CanvasEnvelopeChanged(object sender, EventArgs e) { TileIdentify[] visibleTiles; LevelDef suitableLevel; _tilesLocator.Compute(_canvas, out suitableLevel, out visibleTiles); if (visibleTiles == null || visibleTiles.Length == 0) { return; } //visibleTiles的顺序需要调整 _tilesLocator.ComputeExtand(_canvas, suitableLevel, out visibleTiles); _tileCacheManager.WaitLoading(visibleTiles); _loadStack.Clear(); _tileCacheManager.ClearPastTiles(visibleTiles); _currentLevel = suitableLevel; _tilesLocator.GetRasterRowColOfViewWnd(_canvas, out _bRowAtViewWnd, out _bColAtViewWnd, out _widthAtViewWnd, out _heightAtViewWnd); foreach (TileIdentify tile in visibleTiles) { if (!_tileCacheManager.IsExist(tile)) { _loadStack.Push(tile); ReStartLoadWorker(); } } }
void CanvasEnvelopeChanged(object sender, EventArgs e) { TileIdentify[] visibleTiles; LevelDef suitableLevel; _tilesLocator.Compute(_canvas, out suitableLevel, out visibleTiles); if (visibleTiles == null) { return; } _currentLevel = suitableLevel; _tilesLocator.GetRasterRowColOfViewWnd(_canvas, out _bRowAtViewWnd, out _bColAtViewWnd, out _widthAtViewWnd, out _heightAtViewWnd); foreach (TileIdentify tile in visibleTiles) { if (!_tileCacheManager.IsExist(tile)) { _loadStack.Push(tile); } } }