Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the active tiles by requesting the images required in order to center the display at the
        /// specified geo-coordinate. If there are ongoing image requests, they will be cancelled first.
        /// </summary>
        /// <param name="centerTileKey">Geo-coordinate which will serve as the center of the .</param>
        public void InitializeActiveTilePlane(GeoCoordinate centerGeocoordinate)
        {
            this.centerGeoCoordinate = centerGeocoordinate;

            // If we have pending requests at this point, we must wait for them to be cancelled
            if (pendingRequestCount != 0)
            {
                state = CachePhase.CancellingRequests;
                CancelActiveRequestsAndResetImages();
            }
            else
            {
                state = CachePhase.InitializingTiles;
                GetActivePlaneImages(centerGeocoordinate);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Moves to the next phase of action when a previous phase completes.
        /// </summary>
        private void MoveToNextPhase()
        {
            switch (state)
            {
            case CachePhase.Idle:
                break;

            case CachePhase.CancellingRequests:
                state = CachePhase.InitializingTiles;
                GetActivePlaneImages(centerGeoCoordinate);
                break;

            case CachePhase.InitializingTiles:
                state = CachePhase.Idle;
                break;

            case CachePhase.Disposing:
                // Nothing to do here
                break;

            default:
                break;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Moves to the next phase of action when a previous phase completes.
 /// </summary>        
 private void MoveToNextPhase()
 {
     switch (state)
     {
         case CachePhase.Idle:
             break;
         case CachePhase.CancellingRequests:
             state = CachePhase.InitializingTiles;
             GetActivePlaneImages(centerGeoCoordinate);
             break;
         case CachePhase.InitializingTiles:
             state = CachePhase.Idle;
             break;
         case CachePhase.Disposing:
             // Nothing to do here
             break;
         default:
             break;
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes the active tiles by requesting the images required in order to center the display at the
        /// specified geo-coordinate. If there are ongoing image requests, they will be cancelled first.
        /// </summary>
        /// <param name="centerTileKey">Geo-coordinate which will serve as the center of the .</param>
        public void InitializeActiveTilePlane(GeoCoordinate centerGeocoordinate)
        {
            this.centerGeoCoordinate = centerGeocoordinate;

            // If we have pending requests at this point, we must wait for them to be cancelled
            if (pendingRequestCount != 0)
            {
                state = CachePhase.CancellingRequests;
                CancelActiveRequestsAndResetImages();
            }
            else
            {
                state = CachePhase.InitializingTiles;
                GetActivePlaneImages(centerGeocoordinate);
            }
        }