public GenericRasterTileDownloader(
     MapControl.WPF.TileSource tileSource,
     OverlapBorderPresence overlapBordersPresence,
     Dispatcher uiThreadDispatcher)
 {
     tileUriDelegate         = tileId => VectorMath.TileSourceGetUriWrapper(tileSource, tileId);
     tileImageDelegate       = tileSource.DirectImage is null ? (tileId => tileSource.GetImage(tileId.X, tileId.Y, tileId.LevelOfDetail - 8)) : (TileImageDelegate)(tileId => tileSource.DirectImage(tileId.X, tileId.Y, tileId.LevelOfDetail - 8));
     this.tileSource         = tileSource;
     OverlapBorderPresence   = overlapBordersPresence;
     this.uiThreadDispatcher = uiThreadDispatcher;
 }
Ejemplo n.º 2
0
 public static Uri TileSourceGetUriWrapper(MapControl.WPF.TileSource tileSource, TileId tileId) => tileSource.GetUri((int)tileId.X, (int)tileId.Y, tileId.LevelOfDetail - 8);