Ejemplo n.º 1
0
        public override void UpdateDownloadPriority(TileSource tileSource, int priority)
        {
            AsyncTileRequest tileRequest;

            if (this.tileRequests.TryGetValue(tileSource, out tileRequest))
            {
                tileRequest.NetworkPriority = (NetworkPriority)priority;
            }
        }
Ejemplo n.º 2
0
        public override void Download(TileInfo tileInfo, TileSource tileSource, AsyncTileRequestCompletedHandler callback, NetworkPriority networkPriority)
        {
            AsyncTileRequest tileRequest;

            if (this.tileRequests.TryGetValue(tileSource, out tileRequest))
            {
                throw new InvalidOperationException("Multiple concurrent downloads of the same tile is not supported.");
            }
            AsyncTileRequestQueue.Instance.CreateRequest(tileSource.GetUri(tileInfo), tileInfo, networkPriority, callback);
        }
Ejemplo n.º 3
0
        public override void Cancel(TileSource tileSource)
        {
            AsyncTileRequest tileRequest;

            if (!this.tileRequests.TryGetValue(tileSource, out tileRequest))
            {
                throw new InvalidOperationException(Messages.TileInProgressCancel);
            }
            tileRequest.IsAborted = true;
            tileRequest.AbortIfInQueue();
            tileRequests.Remove(tileSource);
        }
Ejemplo n.º 4
0
 public TileLayer(TileSource tileSource)
     : this(tileSource, Utility.CreateUniqueId())
 {
 }
Ejemplo n.º 5
0
 public TileLayer(TileSource tileSource, string id)
     : base(id)
 {
     SetTileSource(tileSource);
 }
Ejemplo n.º 6
0
 public TileLayer(TileSource tileSource, string id)
     : base(tileSource, id)
 {
     innerSource = tileSource;
 }