Exemple #1
0
 public void SetTileSource(ITileSource source)
 {
     _tileSource = source;
     _tileCache.Clear();
     _fetcher.DataChanged -= FetcherOnDataChanged;
     _fetcher.AbortFetch();
     _fetcher              = new Fetcher <Image>(_tileSource, _tileCache);
     _fetcher.DataChanged += FetcherOnDataChanged;
     _fetcher.ViewChanged(_viewport.Extent, _viewport.Resolution);
     _invalid = true;
 }
Exemple #2
0
        public void SetTileSource(ITileSource source)
        {
            _fetcher.DataChanged -= FetcherOnDataChanged;
            _fetcher.AbortFetch();

            _tileSource             = source;
            _viewport.CenterX       = source.Schema.Extent.CenterX;
            _viewport.CenterY       = source.Schema.Extent.CenterY;
            _viewport.UnitsPerPixel = Math.Max(source.Schema.Extent.Width / ActualWidth, source.Schema.Extent.Height / ActualHeight);
            _tileCache.Clear();
            _fetcher              = new Fetcher <Image>(_tileSource, _tileCache);
            _fetcher.DataChanged += FetcherOnDataChanged;
            _fetcher.ViewChanged(_viewport.Extent, _viewport.UnitsPerPixel);
            _invalid = true;
        }