Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of a LabelLayer with the given name.
 /// </summary>
 /// <param name="layerName">Name of the layer.</param>
 /// <param name="dataSource">Data source provider for the layer.</param>
 public LabelLayer(string layerName, IFeatureLayerProvider dataSource)
     : base(layerName, dataSource)
 {
     _multipartGeometryBehaviour = MultipartGeometryLabelingBehavior.Default;
     _labelFilter = LabelCollisionDetection2D.SimpleCollisionDetection;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new features layer with the given name, style and datasource
 /// and which handles <see cref="FeatureDataTable.FeaturesRequested"/> 
 /// events from <see cref="Features"/>.
 /// </summary>
 /// <param name="layername">Name of the layer.</param>
 /// <param name="style">Style to apply to the layer.</param>
 /// <param name="dataSource">Data source.</param>
 protected FeatureLayer(string layername, VectorStyle style, IFeatureLayerProvider dataSource)
     : this(layername, style, dataSource, true) {}
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new features layer with the given name, style and datasource.
        /// </summary>
        /// <param name="layername">Name of the layer.</param>
        /// <param name="style">Style to apply to the layer.</param>
        /// <param name="dataSource">Data source.</param>
        /// <param name="handleFeatureDataRequest">
        /// Value to indicate the layer should handle 
        /// <see cref="FeatureDataTable.FeaturesRequested"/> events from the <see cref="Features"/>
        /// table.
        /// </param>
        protected FeatureLayer(string layername, VectorStyle style, IFeatureLayerProvider dataSource, bool handleFeatureDataRequest)
            : base(layername, style, dataSource)
        {
            ShouldHandleDataCacheMissEvent = handleFeatureDataRequest;

            _features = new FeatureDataTable();
            _selectedFeatures = new FeatureDataView(_features, Point.Empty, "", DataViewRowState.CurrentRows);
            _highlightedFeatures = new FeatureDataView(_features, Point.Empty, "", DataViewRowState.CurrentRows);

            if (ShouldHandleDataCacheMissEvent)
            {
                _features.FeaturesRequested += handleFeaturesRequested;
            }

            init();
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new features layer with the given name and datasource.
 /// </summary>
 /// <param name="layername">Name of the layer.</param>
 /// <param name="dataSource">Data source.</param>
 /// <param name="handleFeatureDataRequest">
 /// Value to indicate the layer should handle 
 /// <see cref="FeatureDataTable.FeaturesRequested"/> events from the <see cref="Features"/>
 /// table.
 /// </param>
 protected FeatureLayer(string layername, IFeatureLayerProvider dataSource, bool handleFeatureDataRequest)
     : this(layername, new VectorStyle(), dataSource, handleFeatureDataRequest)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new, empty features layer
 /// which handles <see cref="FeatureDataTable.FeaturesRequested"/> 
 /// events from <see cref="Features"/>.
 /// </summary>
 protected FeatureLayer(IFeatureLayerProvider dataSource)
     : this(String.Empty, dataSource)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new layer with the given name, style and datasource.
 /// </summary>
 /// <param name="layername">Name of the layer.</param>
 /// <param name="style">Style to apply to the layer.</param>
 /// <param name="dataSource">Data source.</param>
 public GeometryLayer(string layername, VectorStyle style, IFeatureLayerProvider dataSource)
     : base(layername, style, dataSource)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new layer with the given name and datasource.
 /// </summary>
 /// <param name="layername">Name of the layer.</param>
 /// <param name="dataSource">Data source.</param>
 public GeometryLayer(string layername, IFeatureLayerProvider dataSource)
     : this(layername, new VectorStyle(), dataSource)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new, empty vector layer.
 /// </summary>
 public GeometryLayer(IFeatureLayerProvider dataSource)
     : this(String.Empty, dataSource)
 {
 }