public LabelParameters(ScaleInterval visibleRange, int fontSize, Brush foreground, FontFamily fontFamily, Func <SqlGeometry, SqlGeometry> positionFunc) { this.VisibleRange = visibleRange; this.FontSize = fontSize; this.Foreground = foreground ?? Brushes.Black; this.FontFamily = fontFamily; this.PositionFunc = positionFunc; }
private void Initialize(string layerName, IFeatureDataSource dataSource, VisualParameters parameters, LayerType type, RenderingApproach rendering, RasterizationApproach toRasterTechnique, ScaleInterval visibleRange, SimplePointSymbol pointSymbol, LabelParameters labeling) { this.Id = Guid.NewGuid(); this.DataSource = dataSource; this.Rendering = rendering; this.ToRasterTechnique = toRasterTechnique; var geometries = dataSource.GetGeometries(); if (geometries.Count > 0) { this.Type = type | GetGeometryType(geometries.FirstOrDefault()); } else { this.Type = type; } this.Extent = geometries.GetBoundingBox(); this.LayerName = layerName; this.VisualParameters = parameters; this.PointSymbol = pointSymbol ?? new SimplePointSymbol() { SymbolWidth = 4, SymbolHeight = 4 }; //this.PositionFunc = positionFunc; this.Labels = labeling; //Check for missing visibleRange if (this.Labels != null) { if (this.Labels.VisibleRange == null) { this.Labels.VisibleRange = visibleRange; } } this.VisibleRange = (visibleRange == null) ? ScaleInterval.All : visibleRange; }
public RasterLayer(IDataSource dataSource, string layerName, ScaleInterval visibleRange, bool isBaseMap, bool isPyramid, Visibility visibility, double opacity, RenderingApproach rendering = RenderingApproach.Default) { this.Id = Guid.NewGuid(); this._type = isBaseMap ? LayerType.BaseMap : (isPyramid ? LayerType.ImagePyramid : LayerType.Raster); this.DataSource = dataSource; this.LayerName = layerName; this.VisibleRange = visibleRange; //this.VisualParameters = new VisualParameters(null, isBaseMap ? null : Brushes.Black, isBaseMap ? 0 : 1, opacity); this.VisualParameters = new VisualParameters(null, null, 0, opacity, visibility); }
public override bool Equals(object obj) { if (obj is double) { return(((double)obj) > Lower && ((double)obj) < Upper); } else if (obj is ScaleInterval) { ScaleInterval temp = obj as ScaleInterval; return(temp.Lower.Equals(this.Lower) && temp.Upper.Equals(this.Upper)); } return(false); }
public VectorLayer(string layerName, IFeatureDataSource dataSource, VisualParameters parameters, LayerType type, RenderingApproach rendering, RasterizationApproach toRasterTechnique, ScaleInterval visibleRange, SimplePointSymbol pointSymbol = null, LabelParameters labeling = null) { Initialize(layerName, dataSource, parameters, type, rendering, toRasterTechnique, visibleRange, pointSymbol, labeling); }
public LabelParameters(ScaleInterval visibleRange, int fontSize, Color foreground, FontFamily fontFamily, Func <SqlGeometry, SqlGeometry> positionFunc) : this(visibleRange, fontSize, new SolidColorBrush(foreground), fontFamily, positionFunc) { }