/// <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;
 }
 /// <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) {}
        /// <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();
        }
 /// <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)
 {
 }
 /// <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)
 {
 }
 /// <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)
 {
 }
 /// <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)
 {
 }
 /// <summary>
 /// Initializes a new, empty vector layer.
 /// </summary>
 public GeometryLayer(IFeatureLayerProvider dataSource)
     : this(String.Empty, dataSource)
 {
 }