-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathIAsyncLayer.cs
More file actions
54 lines (47 loc) · 2.04 KB
/
IAsyncLayer.cs
File metadata and controls
54 lines (47 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System.Drawing;
using System.Drawing.Imaging;
using GeoAPI.Geometries;
namespace SharpMap.Layers
{
/// <summary>
/// Delegate function definition for handling <see cref="T:SharpMap.Layers.ITileAsyncLayer"/>s <see cref="E:SharpMap.Layers.ITileAsyncLayer.MapNewTileAvaliable"/> event
/// </summary>
/// <param name="sender">The sender</param>
/// <param name="bbox">The bounding box of the tile</param>
/// <param name="bm">The tile bitmap</param>
/// <param name="sourceWidth">The tiles width</param>
/// <param name="sourceHeight">The tiles height</param>
/// <param name="imageAttributes">The <see cref="ImageAttributes"/> to use when rendering the tile</param>
public delegate void MapNewTileAvaliabledHandler(ITileAsyncLayer sender, Envelope bbox, Bitmap bm, int sourceWidth, int sourceHeight, ImageAttributes imageAttributes);
/// <summary>
/// Delegate for notifying download of tiles
/// </summary>
/// <param name="tilesRemaining"></param>
public delegate void DownloadProgressHandler(int tilesRemaining);
/// <summary>
/// Interface for async tile layers
/// </summary>
public interface ITileAsyncLayer
{
/// <summary>
/// Event raised when a new tile is available
/// </summary>
event MapNewTileAvaliabledHandler MapNewTileAvaliable;
/// <summary>
/// Event raised when download progress of tiles has changed
/// </summary>
event DownloadProgressHandler DownloadProgressChanged;
/// <summary>
/// Gets or sets a value indicating if the map only should only be redrawn when all tiles are downloaded
/// </summary>
bool OnlyRedrawWhenComplete { get; set; }
/// <summary>
/// Method to cancel the async layer
/// </summary>
void Cancel();
/// <summary>
/// Returns the number of tiles that are in queue for download
/// </summary>
int NumPendingDownloads { get; }
}
}