# Some Questions how to use WfsV2FeatureLayer

**URL:** <https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650>\
**Category:** ThinkGeo UI for Desktop\
**Created:** [July 16, 2025, 11:32am UTC](https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650 "2025-07-16T11:32:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juergen\_Schiefer](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@Juergen\_Schiefer](https://community.thinkgeo.com/u/Juergen_Schiefer)\
**Post date:** [July 16, 2025, 11:32am UTC](https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650/1 "2025-07-16T11:32:12Z")

</div>

Hallo,

i try to use some WFS Layers in germany-saxonia (ThinkGeo Version 14.3.1) with the following code:

```
 string serviceLocationUrl = @"https://luis.sachsen.de/arcgis/services/luft/tierhaltung_wfs/MapServer/WFSServer";
 string typeName = "tierhaltung_wfs:Tierhaltung";

 wfsV2FeatureLayer layer = new WfsV2FeatureLayer()
 {
     WebProxy = proxy,
     ServiceLocationUrl = serviceLocationUrl,
     TypeName = typeName,
     TimeoutInSeconds = 500
 };

 layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyle.CreateSimplePointStyle(PointSymbolType.StarCircled, GeoColors.Black, 5);
 layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

 layer.FeatureSource.ProjectionConverter = new ProjectionConverter(sridWfs, sridView);

```

First, the layer will shown. But when I zoom, the WfsV2Overlay will never refreshed (see the picture). The same behavior with

```
string serviceLocationUrl = @"https://geoportal.umwelt.sachsen.de/arcgis/services/luft/ie_anlagenbestand_wfs/MapServer/WFSServer";
string typeName = "ie_anlagenbestand_wfs:Anlagenbestand_nach_IE-Richtlinie";

```

 ![wfs](https://community.thinkgeo.com/uploads/default/original/3X/6/b/6b64f12c61eb94ebe0515644ff9ae9b0a16d3fa4.jpeg)

And when I try to get the Columnvalues, the Columns are created but with no Values.

```
   var source = layer.FeatureSource;
   try
   {
       source.Open();
       var features = source.GetAllFeatures(ReturningColumnsType.AllColumns);
       source.Close();
   }
   catch (Exception ex)
   {
       MessageBox.Show(ex.Message);
   }

```

Basically, I try to develop a module, that connects with the WFS Services and store the features in a database for offline use.  
So I use WfsV2FeatureLayer as a base class and for every WFS Service that I have to use, I will develop a specialised class.

Please give me an advice, how to do that.

Regards Torsten

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [July 17, 2025, 1:28am UTC](https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650/2 "2025-07-17T01:28:27Z")

</div>

Hi Torsten,

Can you provide me more code snippet? For example what’re sridWfs, sridView in your code?

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![Juergen\_Schiefer](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@Juergen\_Schiefer](https://community.thinkgeo.com/u/Juergen_Schiefer)\
**Post date:** [July 18, 2025, 9:07am UTC](https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650/3 "2025-07-18T09:07:12Z")

</div>

Hallo Ben,  
thanks for your answer. The code is from a Wpf-Test project.

```
private void WfsLuisTierhaltung_Click(object sender, RoutedEventArgs e)
{
    var overlay = TisWfsHelper.CreateOverlayLUISSachsenTierhaltung(NetworkTools.Proxy, 25832, 25833);
    this.mapControl.Overlays.Add(overlay);
    _ = this.mapControl.RefreshAsync();
    this.mainWindowModel.MyOverlays.Add(new MainWindowModel.theOverlay() { IsVisible = true, MyOverlay = overlay });
}

public static TisWfsV2Overlay CreateOverlayLUISSachsenTierhaltung(IWebProxy proxy, int sridView, int sridWfs)
{
    var layer = TisWfsHelper.CreateLayerLUISSachsenTierhaltung(proxy, sridView, sridWfs);
    var overlay = new TisWfsV2Overlay()
    {
        FeatureLayer = layer,
        DrawingBulkCount = 500
    };
    return overlay;
}

static TisWfsV2FeatureLayer CreateLayerLUISSachsenTierhaltung(IWebProxy proxy, int sridView, int sridWfs)
{
    string serviceLocationUrl = @"https://luis.sachsen.de/arcgis/services/luft/tierhaltung_wfs/MapServer/WFSServer";
    string typeName = "tierhaltung_wfs:Tierhaltung";

    TisWfsV2FeatureLayer layer = new TisWfsV2FeatureLayer()
    {
        WebProxy = proxy,
        ServiceLocationUrl = serviceLocationUrl,
        TypeName = typeName,
        TimeoutInSeconds = 500
    };

    layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyle.CreateSimplePointStyle(PointSymbolType.StarCircled, GeoColors.Black, 5);
    layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
    layer.FeatureSource.ProjectionConverter = new ProjectionConverter(sridWfs, sridView);

    var source = layer.FeatureSource;
    try
    {
        source.Open();
        var features = source.GetAllFeatures(ReturningColumnsType.AllColumns);
        source.Close();
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
    return layer;
}

```

Regards Torsten

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [July 19, 2025, 8:32pm UTC](https://community.thinkgeo.com/t/some-questions-how-to-use-wfsv2featurelayer/10650/4 "2025-07-19T20:32:30Z")

</div>

Hi Juergen,

I found some issues in the WfsV2FeatureLayer, please pull the latest beta 14.4.0-beta046 and here are some options for you:

1. Use your existing code but don’t need to GetAllFeatures(), as following. This will fetch the data only for the current extent.

> ```
> static WfsV2FeatureLayer CreateLayerLUISSachsenTierhaltung(IWebProxy proxy, int sridView, int sridWfs)
> {
> string serviceLocationUrl = @"https://luis.sachsen.de/arcgis/services/luft/tierhaltung_wfs/MapServer/WFSServer";
> string typeName = "tierhaltung_wfs:Tierhaltung";
> 
> WfsV2FeatureLayer layer = new WfsV2FeatureLayer()
> {
> WebProxy = proxy,
> ServiceLocationUrl = serviceLocationUrl,
> TypeName = typeName,
> TimeoutInSeconds = 500
> };
> 
> layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyle.CreateSimplePointStyle(PointSymbolType.StarCircled, GeoColors.Black, 5);
> layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
> layer.FeatureSource.ProjectionConverter = new ProjectionConverter(sridWfs, sridView);
> 
> return layer;
> }
> 
> ```

1. Call GetAllFeatures() like what you are doing now, create a new InMemoryFeatureLayer and add all the returned features to InMemoryFeatureLayer.InternalFeatures. Instead of WfsV2Overlay, add that InMemoryFeatureLayer to a LayerOverlay or FeatureLayerWpfDrawingOverlay.

Have a try and let us know if you have other questions.

Thanks,  
Ben
