${WP_mapping_Layer_Title}

${WP_mapping_Layer_Description}

Inheritance: System.Windows.DependencyObject, INotifyPropertyChanged
 internal LayerContainer(Layer layer)
 {
     this.Layer = layer;
     base.Opacity = layer.Opacity;
     this.progress = layer.progress;
     this.orignalBounds = new List<Rectangle2D>();
     layer.Progress += new EventHandler<ProgressEventArgs>(this.layer_Progress);
     layer.PropertyChanged += new PropertyChangedEventHandler(this.layer_PropertyChanged);
 }
示例#2
0
        private void LoadLayerInView(bool useTransitions, Rectangle2D drawBounds, Layer layer)
        {
            if (!Rectangle2D.IsNullOrEmpty(drawBounds) && layer.IsInitialized && (layer.Error == null)
      && (layer.MinVisibleResolution <= mapResolution) && (layer.MaxVisibleResolution >= mapResolution)
      && layer.IsVisible && Layers.Contains(layer) && CoordinateReferenceSystem.Equals(layer.CRS, CRS, true))
            {
                Rectangle2D last = (Rectangle2D)(layer.GetValue(LastLayerViewBoundsProperty));
                if (Rectangle2D.IsNullOrEmpty(last) || !drawBounds.Equals(last))
                {
                    layer.Draw(new DrawParameter()
                    {
                        UseTransitions = useTransitions,
                        Resoluitons = Resolutions,
                        Resolution = targetResolution,
                        ViewBounds = drawBounds,
                        ViewSize = currentSize,
                        LayerOrigin = layer.Container.Origin
                    });
                    layer.SetValue(LastLayerViewBoundsProperty, drawBounds);
                }
            }

        }
示例#3
0
 private void InsertLayerContainer(Layer layer)
 {
     int index = 0;
     int num = Layers.IndexOf(layer);
     if (num > 0)
     {
         for (int i = num - 1; i >= 0; i--)
         {
             Layer layer2 = this.Layers[i];
             if ((layer2.Container != null) && (layer2.Container.Parent == this.layerCollectionContainer))
             {
                 index = this.layerCollectionContainer.Children.IndexOf(layer2.Container) + 1;
                 break;
             }
         }
     }
     layerCollectionContainer.Children.Insert(index, layer.Container);
 }
示例#4
0
        private void RemoveMapLayers(Layer _layer)
        {
            _layer.LayerChanged -= new Layer.LayerChangedHandler(this.layer_OnLayerChanged);
            _layer.Initialized -= new EventHandler<EventArgs>(this.layer_Initialized);
            _layer.CancelLoad();
            _layer.Container.Children.Clear();
            if ((this.layerCollectionContainer != null) && this.layerCollectionContainer.Children.Contains(_layer.Container))
            {
                this.layerCollectionContainer.Children.Remove(_layer.Container);
            }
            _layer.ClearValue(MapProperty);//用的都是Clear
            _layer.ClearValue(LastLayerViewBoundsProperty);

            if (((_layer is FeaturesLayer) && (this.Popup.Child != null)) && ((_layer as FeaturesLayer).ToolTip == this.Popup.Child))
            {
                this.CloseToolTip();
            }
        }
示例#5
0
 private void AssignLayerContainer(Layer layer)
 {
     if (layer.Container.Parent == null && layer.IsInitialized && layer.Error == null)
     {
         layer.Container.OriginX = this.origin.X;
         layer.Container.OriginY = this.origin.Y;
         layer.Container.Resolution = this.mapResolution;
         this.InsertLayerContainer(layer);
     }
 }