示例#1
0
        /// <inheritdoc/>
        public override void Update(UpdateMode updateMode)
        {
            // use bitmap rendering vor levels < 10
            if (MapView.FinalZoom < 10)
            {
                if (vectorCanvas != null)
                {
                    Children.Remove(vectorCanvas);
                    vectorCanvas = null;
                }

                if (bitmapCanvas == null)
                {
                    bitmapCanvas = new UntiledCanvas(MapView, new MyOverlayRenderer
                    {
                        SymbolColor = SymbolColor,
                        SymbolSize  = SymbolSize,
                        Locations   = Locations
                    }, false);
                    Children.Add(bitmapCanvas);
                }

                bitmapCanvas.Update(updateMode);
            }
            else
            {
                if (bitmapCanvas != null)
                {
                    Children.Remove(bitmapCanvas);
                    bitmapCanvas = null;
                }

                if (vectorCanvas == null)
                {
                    vectorCanvas = new MyDeepZoomCanvas(MapView)
                    {
                        SymbolColor = SymbolColor,
                        SymbolSize  = SymbolSize,
                        Locations   = Locations
                    };
                    Children.Add(vectorCanvas);
                }

                vectorCanvas.Update(updateMode);
            }
        }
        /// <inheritdoc/>
        public override void Update(UpdateMode updateMode)
        {
            // use bitmap rendering vor levels < 10
            if (MapView.FinalZoom < 10)
            {
                if (vectorCanvas != null)
                {
                    this.Children.Remove(vectorCanvas);
                    vectorCanvas = null;
                }

                if (bitmapCanvas == null)
                {
                    bitmapCanvas = new UntiledCanvas(MapView, new MyOverlayRenderer() {
                        SymbolColor = this.SymbolColor,
                        SymbolSize = this.SymbolSize,
                        Locations = this.Locations }, false);
                    this.Children.Add(bitmapCanvas);
                }

                bitmapCanvas.Update(updateMode);
            }
            else
            {
                if (bitmapCanvas != null)
                {
                    this.Children.Remove(bitmapCanvas);
                    bitmapCanvas = null;
                }

                if (vectorCanvas == null)
                {
                    vectorCanvas = new MyDeepZoomCanvas(MapView)
                    {
                        SymbolColor = this.SymbolColor,
                        SymbolSize = this.SymbolSize,
                        Locations = this.Locations
                    };
                    this.Children.Add(vectorCanvas);
                }

                vectorCanvas.Update(updateMode);
            }
        }