Select to view content in your preferred language

WFS-T in FlexViewer Widget

4281
10
03-31-2011 07:03 AM
AaronGilliland
Regular Contributor
I have integrated the code from the 2009 dev summit that employed a flex application (not the standard flexviewer 1.3 or 2.x) for editing data via WFS-T into a widget on the Flexviewer 1.3 application.

I have it nearly running. In fiddler I can watch proper requests/responses from various WFS services but I am getting a "unable to load features" error on the front end.

There is no stack trace or more descriptive error I could find. I have been working this for a while and it seems that others have tried but have been unsuccessful.

It may have something to do with how the Flexviewer MapManager or Controller works with graphicslayers but I am unsure. Any assistance is much appreciated.

I have attached the widget code.
Tags (2)
0 Kudos
10 Replies
AaronGilliland
Regular Contributor
Under the WFSLayer.as in the wfst library:
  override public var symbolFunction :Function = function( graphic :Graphic ) :Symbol
  {
   if( graphic != null && graphic.geometry != null )
   {
    if( graphic.geometry is MapPoint )
    {
     return new SimpleMarkerSymbol( "circle", 13, 0xfdd0a2, 0.75, new SimpleLineSymbol( "solid", 0xfd8d3c, 1, 2 ) );
    }
    if( graphic.geometry is Polygon )
    {
     return new SimpleFillSymbol( "solid", 0xfdd0a2, 0.75, new SimpleLineSymbol( "solid", 0xfd8d3c, 1, 2 ) );
    }
    if( graphic.geometry is Polyline )
    {
     return new SimpleLineSymbol( "solid", 0xfd8d3c, 1, 3 );
    }
   }
   return null;
  }

While symbol functions have been deprecated somewhere between 1.1 to 1.3. This I believe is the root of the issue. There may be other unknowns that are creating compatibility issues.

I will attempt to update the wfst library to the 1.3 spec then add it to the flex viewer for a wfs widget to use.
0 Kudos
AaronGilliland
Regular Contributor
Done.

The simpleMarkerSymbol under the new renderer required x,y offset and angle. I added the information into each and compiled the new SWC.

See wfst-1.1.zip for the new library that is compliant with Flex 1.3. Just unzip and drop the drop the swc into your lib and away you go.

Thus now I have a wfst editor widget working in flexviewer. YAY!!!

I might publish the widget. If anyone wants it let me know I'll post it.
0 Kudos
YohanBienvenue1
Deactivated User
Hi Aaron, I'm currently gathering information about how to use WFS in a Flex application. I saw the API for Flex does not seem to support it yet, and I was wondering if someone had done a custom WFSLayer component built on top of ESRI's FeatureLayer, or something similar that would allow a Flex application to easily make WFS requests on a MapServer offering WFS services.

Yours seems to be an independent component. Can you use such a component to achieve everything the FeatureLayer would?

For instance could I achieve the same things as the FeatureLayer samples?
http://help.arcgis.com/en/webapi/flex/samples/index.html

If so yes I find this very interesting, I would love to see a working version or short example of an application on how you use it.

Hopefully ESRI will release a WFS component to make this as easy as their WMSLayer one, but until then I'm looking for alternatives.

Thanks
0 Kudos
GanapathiRamaraj
New Contributor
Hi Aaron, I am getting following error "unable to load SWC wfst-1.1.swc" after copying "wfst-1.1.swc" to the libs folder.
0 Kudos
TomGiles
Deactivated User
Hi Aaron, I'm currently gathering information about how to use WFS in a Flex application. I saw the API for Flex does not seem to support it yet, and I was wondering if someone had done a custom WFSLayer component built on top of ESRI's FeatureLayer, or something similar that would allow a Flex application to easily make WFS requests on a MapServer offering WFS services.

Yours seems to be an independent component. Can you use such a component to achieve everything the FeatureLayer would?

For instance could I achieve the same things as the FeatureLayer samples?
http://help.arcgis.com/en/webapi/flex/samples/index.html

If so yes I find this very interesting, I would love to see a working version or short example of an application on how you use it.

Hopefully ESRI will release a WFS component to make this as easy as their WMSLayer one, but until then I'm looking for alternatives.



Hi Yohan,

I would be interested in hearing any progress you've made so far, as I am attempting a very similar solution. If it interests you please let me know at tagiles@gmail.com

Cheers,
Tom
0 Kudos
samirshamaa
New Contributor
hi all,

do you have this library running on flexviewer 2.5?
or the source code of the wfst-1.1.swc?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Samir,

   The source code is in the link you saw in the other post:

http://arcscripts.esri.com/details.asp?dbid=16191

devsummit2009\dist\wfs+wfst\wfst.zip
0 Kudos
MarcoVassura
New Contributor
I've debugged and updated the code for flexviewer 2.5 and wrote some widget for my needs. I've posted everything on Code gallery: http://www.arcgis.com/home/item.html?id=d93a120bffa941baa584bc49a97b85c2
0 Kudos
AaronGilliland
Regular Contributor
I just started a google code project for wfst-arcgis-viewer. See https://code.google.com/p/wfst-arcgis-viewer/.

I have two tags 1.1 and 2.4.
0 Kudos