${mapping_Layer_Title}
${mapping_Layer_Description}
internal LayerContainer(Layer layer) { this.Layer = layer; base.Opacity = layer.Opacity; this.progress = layer.progress; this.orignalBounds = new List<Rectangle2D>(); layer.Progress += new Layer.ProgressHandler(this.layer_Progress); layer.PropertyChanged += new PropertyChangedEventHandler(this.layer_PropertyChanged); }
public LayerLegendItemInfo(ServerLayer sl, Layer layer, double height, double width, bool expanded) : this() { Height = height; Width = width; IsExpanded = expanded; serverLayer = sl; iClientLayer = layer; AssignValueToPropertyIgnoreLayerType(); }
public MapLegendItemInfo(Layer iClientLayer, Map iClientMap, bool _showOnlyVisibleLayers, double height, double width, bool expanded, Action<MapLegendItemInfo> action) : this() { //ToDo: this.layer = iClientLayer; this.map = iClientMap; this.Description = iClientLayer.ID; this.Name = iClientLayer.ID; showOnlyVisibleLayers = _showOnlyVisibleLayers; DoUIRefresh = action; SwitchLayersInfo(iClientLayer.Url, iClientLayer.ID); sourceImageWidth = width; sourceImageHeight = height; IsExpanded = expanded; }
private void LoadLayerInView(bool useTransitions, Rectangle2D drawBounds, Layer layer) { if (!drawBounds.IsEmpty && 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 (last.IsEmpty || !drawBounds.Equals(last)) { layer.ViewBounds = drawBounds; layer.Resolution = targetResolution; layer.ViewSize = currentSize; layer.LayerOrigin = layer.Container.Origin; layer.Draw(new DrawParameter() { UseTransitions = useTransitions, Resoluitons = Resolutions }); layer.SetValue(LastLayerViewBoundsProperty, drawBounds); } } }
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(); } }
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); }
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); } }