internal override bool CheckBeforeDraw(UpdateParameter updateParameter)
 {
     if ((Map.MapManipulator == MapManipulator.None && Map.MapStatus == MapStatus.Still) ||
         Map.MapStatus == MapStatus.PanCompleted ||
         Map.MapStatus == MapStatus.ZoomCompleted)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Example #2
0
 internal override bool CheckBeforeDraw(UpdateParameter updateParameter)
 {
     if ((base.IsInitialized && base.IsVisible) && (base.Container != null))
     {
         if (Map.MapStatus == MapStatus.Zooming && (GetCachedResolutions() == null) &&
             updateParameter.Resolutions == null)
         {
             return false;
         }
         return true;
     }
     return false;
 }
Example #3
0
        internal override void Draw(UpdateParameter updateParameter)
        {
            base.Draw(updateParameter);
            if ((base.IsInitialized && base.IsVisible) && (!Rectangle2D.IsNullOrEmpty(ViewBounds)) && (base.Container != null))
            {
                if (GetCachedResolutions() != null)
                {
                    realResolutions = this.GetCachedResolutions();
                }
                else
                {
                    realResolutions = updateParameter.Resolutions;
                }
                double resolution = MathUtil.GetNearest(updateParameter.Resolution,realResolutions,MinVisibleResolution,MaxVisibleResolution);

                int[] span = this.GetTileSpanWithin(ViewBounds, resolution);

                int level = -1;
                needShowTiles = NeedShowTiles(resolution, span, updateParameter.UseTransitions, out level);
                TileComparer comparer = new TileComparer();
                List<Tile> needDownload = needShowTiles.Except<Tile>(_inContainer.Values, comparer).ToList();
                if (needDownload.Count > 0)
                {
                    _queueSystem.InputTiles(uniqueLayerId, needDownload);
                }
            }
        }
        internal override void Draw(UpdateParameter updateParameter)
        {
            if (base.Container != null)
            {
                Rectangle2D bounds = ViewBounds;
                double num = 20.0 * Resolution;
                Rectangle2D biggerBounds = bounds.Inflate(num, num);//上下左右扩张20个像素的距离
                foreach (UIElement element in this.Children)
                {
                    if (element == null)
                    {
                        return;
                    }
                    if (!(element.GetValue(BBoxProperty) is Rectangle2D))
                    {
                        throw new ArgumentException(ExceptionStrings.BboxIsNotSet);
                    }

                    Rectangle2D rect = GetBBox(element);
                    if (rect.IntersectsWith(biggerBounds) && !base.Container.Children.Contains(element))
                    {
                        if (element is ShapeElement)
                        {
                            ShapeElement sb = element as ShapeElement;
                            sb.SetPath();
                            sb.InvalidatePath(base.Container.Resolution, base.Container.OriginX, base.Container.OriginY);

                            ElementsLayer.SetBBox(sb, sb.ClippedBounds);
                        }
                        base.Container.Children.Add(element);
                    }
                }
            }
        }
 internal override bool CheckBeforeDraw(UpdateParameter updateParameter)
 {
     if (Map.MapStatus == MapStatus.Zooming)
     {
         return false;
     }
     return true;
 }
Example #6
0
 internal abstract void Draw(UpdateParameter updateParameter);
Example #7
0
 internal virtual bool CheckBeforeDraw(UpdateParameter updateParameter)
 {
     return true;
 }
Example #8
0
 internal void Update (UpdateParameter updateParameter)
 {
     if (CheckBeforeDraw(updateParameter))
     {
         Resolution = updateParameter.Resolution;
         ViewBounds = updateParameter.ViewBounds;
         ViewSize = updateParameter.ViewSize;
         LayerOrigin = updateParameter.LayerOrigin;
         Draw(updateParameter);
     }
 }
 internal override void Draw(UpdateParameter updateParameter)
 {
     base.Draw(updateParameter);
     if ((!Rectangle2D.IsNullOrEmpty(ViewBounds)) && (base.IsVisible))
     {
         this.OnProgress(0);
         //if (_timer.IsEnabled)
         //{
         //    _timer.Stop();
         //}
         //_timer.Start();
         ImageInfo image = new ImageInfo();
         image.ViewBounds = this.ViewBounds;
         StartDownloadImage(image);
     }
 }