Example #1
0
        public virtual void ResetCache()
        {
            try {
                m_isResetingCache  = true;
                this.isInitialized = false;

                if (northEastChild != null)
                {
                    northEastChild.ResetCache();
                }

                if (northWestChild != null)
                {
                    northWestChild.ResetCache();
                }

                if (southEastChild != null)
                {
                    southEastChild.ResetCache();
                }

                if (southWestChild != null)
                {
                    southWestChild.ResetCache();
                }

                this.Dispose();

                QuadTileSet.ImageStore.DeleteLocalCopy(this);

                m_isResetingCache = false;
            }
            catch {}
        }
Example #2
0
        public virtual void ResetCacheForCurrentView(WorldWind.Camera.CameraBase camera)
        {
            //                      if (!ImageStore.IsDownloadableLayer)
            //                              return;

            ArrayList deletionList = new ArrayList();

            //reset "root" tiles that intersect current view
            lock (m_topmostTiles.SyncRoot)
            {
                foreach (long key in m_topmostTiles.Keys)
                {
                    QuadTile qt = (QuadTile)m_topmostTiles[key];
                    if (camera.ViewFrustum.Intersects(qt.BoundingBox))
                    {
                        qt.ResetCache();
                        deletionList.Add(key);
                    }
                }

                foreach (long deletionKey in deletionList)
                {
                    m_topmostTiles.Remove(deletionKey);
                }
            }
        }